@designliquido/delegua 1.13.2 → 1.15.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/analisador-documentario/index.d.ts +1 -1
- package/analisador-semantico/analisador-semantico.d.ts.map +1 -1
- package/analisador-semantico/analisador-semantico.js +12 -2
- package/analisador-semantico/analisador-semantico.js.map +1 -1
- package/avaliador-sintatico/avaliador-sintatico.d.ts.map +1 -1
- package/avaliador-sintatico/avaliador-sintatico.js +10 -0
- package/avaliador-sintatico/avaliador-sintatico.js.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-calango.d.ts +25 -5
- package/avaliador-sintatico/dialetos/avaliador-sintatico-calango.d.ts.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-calango.js +301 -25
- package/avaliador-sintatico/dialetos/avaliador-sintatico-calango.js.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.d.ts.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.js +4 -10
- package/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.js.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-tenda.d.ts.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-tenda.js +33 -2
- package/avaliador-sintatico/dialetos/avaliador-sintatico-tenda.js.map +1 -1
- package/bibliotecas/biblioteca-global.d.ts.map +1 -1
- package/bibliotecas/biblioteca-global.js +3 -7
- package/bibliotecas/biblioteca-global.js.map +1 -1
- package/bibliotecas/dialetos/tenda/biblioteca-global.d.ts +3 -0
- package/bibliotecas/dialetos/tenda/biblioteca-global.d.ts.map +1 -0
- package/bibliotecas/dialetos/tenda/biblioteca-global.js +365 -0
- package/bibliotecas/dialetos/tenda/biblioteca-global.js.map +1 -0
- package/bin/package.json +1 -1
- package/construtos/vetor.d.ts.map +1 -1
- package/construtos/vetor.js.map +1 -1
- package/interfaces/documentario/documentario-analisado.d.ts +2 -2
- package/interfaces/documentario/index.d.ts +3 -3
- package/interpretador/depuracao/interpretador-com-depuracao.d.ts.map +1 -1
- package/interpretador/depuracao/interpretador-com-depuracao.js +8 -0
- package/interpretador/depuracao/interpretador-com-depuracao.js.map +1 -1
- package/interpretador/dialetos/calango/interpretador-calango.d.ts +2 -0
- package/interpretador/dialetos/calango/interpretador-calango.d.ts.map +1 -1
- package/interpretador/dialetos/calango/interpretador-calango.js +15 -0
- package/interpretador/dialetos/calango/interpretador-calango.js.map +1 -1
- package/interpretador/dialetos/index.d.ts +1 -0
- package/interpretador/dialetos/index.d.ts.map +1 -1
- package/interpretador/dialetos/index.js +1 -0
- package/interpretador/dialetos/index.js.map +1 -1
- package/interpretador/dialetos/pitugues/interpretador-pitugues.d.ts.map +1 -1
- package/interpretador/dialetos/pitugues/interpretador-pitugues.js.map +1 -1
- package/interpretador/dialetos/tenda/index.d.ts +2 -0
- package/interpretador/dialetos/tenda/index.d.ts.map +1 -0
- package/interpretador/dialetos/tenda/index.js +18 -0
- package/interpretador/dialetos/tenda/index.js.map +1 -0
- package/interpretador/dialetos/tenda/interpretador-tenda.d.ts +13 -0
- package/interpretador/dialetos/tenda/interpretador-tenda.d.ts.map +1 -0
- package/interpretador/dialetos/tenda/interpretador-tenda.js +31 -0
- package/interpretador/dialetos/tenda/interpretador-tenda.js.map +1 -0
- package/interpretador/interpretador.d.ts +2 -1
- package/interpretador/interpretador.d.ts.map +1 -1
- package/interpretador/interpretador.js +24 -1
- package/interpretador/interpretador.js.map +1 -1
- package/interpretador/pilha-escopos-execucao.d.ts.map +1 -1
- package/interpretador/pilha-escopos-execucao.js +3 -0
- package/interpretador/pilha-escopos-execucao.js.map +1 -1
- package/lexador/dialetos/lexador-calango.d.ts +1 -0
- package/lexador/dialetos/lexador-calango.d.ts.map +1 -1
- package/lexador/dialetos/lexador-calango.js +77 -0
- package/lexador/dialetos/lexador-calango.js.map +1 -1
- package/lexador/dialetos/lexador-pitugues.d.ts.map +1 -1
- package/lexador/dialetos/lexador-pitugues.js +2 -4
- package/lexador/dialetos/lexador-pitugues.js.map +1 -1
- package/lexador/dialetos/palavras-reservadas/calango.d.ts +31 -4
- package/lexador/dialetos/palavras-reservadas/calango.d.ts.map +1 -1
- package/lexador/dialetos/palavras-reservadas/calango.js +31 -4
- package/lexador/dialetos/palavras-reservadas/calango.js.map +1 -1
- package/package.json +1 -1
- package/tipos-de-simbolos/calango.d.ts +28 -0
- package/tipos-de-simbolos/calango.d.ts.map +1 -1
- package/tipos-de-simbolos/calango.js +28 -0
- package/tipos-de-simbolos/calango.js.map +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/tradutor-assembly-risc-v.d.ts +99 -0
- package/tradutores/tradutor-assembly-risc-v.d.ts.map +1 -0
- package/tradutores/tradutor-assembly-risc-v.js +685 -0
- package/tradutores/tradutor-assembly-risc-v.js.map +1 -0
- package/tradutores/tradutor-assemblyscript.js +1 -1
- package/tradutores/tradutor-assemblyscript.js.map +1 -1
- package/tradutores/tradutor-webassembly.d.ts +159 -0
- package/tradutores/tradutor-webassembly.d.ts.map +1 -0
- package/tradutores/tradutor-webassembly.js +901 -0
- package/tradutores/tradutor-webassembly.js.map +1 -0
- package/umd/delegua.js +2066 -279
package/umd/delegua.js
CHANGED
|
@@ -762,7 +762,10 @@ class AnalisadorSemantico extends analisador_semantico_base_1.AnalisadorSemantic
|
|
|
762
762
|
switch (condicao.constructor) {
|
|
763
763
|
case construtos_1.Literal:
|
|
764
764
|
const condicaoLiteral = condicao;
|
|
765
|
-
|
|
765
|
+
const tiposNumericos = ['inteiro', 'número', 'real'];
|
|
766
|
+
const ambosSaoNumericos = tiposNumericos.includes(condicaoLiteral.tipo) &&
|
|
767
|
+
tiposNumericos.includes(tipo);
|
|
768
|
+
if (condicaoLiteral.tipo !== tipo && !ambosSaoNumericos) {
|
|
766
769
|
this.erro({
|
|
767
770
|
lexema: condicaoLiteral.valor,
|
|
768
771
|
tipo: condicaoLiteral.tipo,
|
|
@@ -881,7 +884,14 @@ class AnalisadorSemantico extends analisador_semantico_base_1.AnalisadorSemantic
|
|
|
881
884
|
this.verificarOperadorBinario(binario.direita);
|
|
882
885
|
}
|
|
883
886
|
const operadoresMatematicos = ['ADICAO', 'SUBTRACAO', 'MULTIPLICACAO', 'DIVISAO', 'MODULO'];
|
|
884
|
-
const operadoresComparacao = [
|
|
887
|
+
const operadoresComparacao = [
|
|
888
|
+
'MAIOR',
|
|
889
|
+
'MAIOR_IGUAL',
|
|
890
|
+
'MENOR',
|
|
891
|
+
'MENOR_IGUAL',
|
|
892
|
+
'IGUAL',
|
|
893
|
+
'DIFERENTE',
|
|
894
|
+
];
|
|
885
895
|
if (operadoresMatematicos.includes(binario.operador.tipo)) {
|
|
886
896
|
this.verificarTiposOperandos(binario);
|
|
887
897
|
}
|
|
@@ -2679,6 +2689,16 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
2679
2689
|
}
|
|
2680
2690
|
if (entidadeChamada.constructor === construtos_1.Variavel) {
|
|
2681
2691
|
const entidadeChamadaResolvidaVariavel = entidadeChamada;
|
|
2692
|
+
const informacoesFuncaoBibliotecaGlobal = this.pilhaEscopos.obterBibliotecaGlobal(entidadeChamadaResolvidaVariavel.simbolo.lexema);
|
|
2693
|
+
if (informacoesFuncaoBibliotecaGlobal &&
|
|
2694
|
+
Array.isArray(informacoesFuncaoBibliotecaGlobal.subElementos) &&
|
|
2695
|
+
informacoesFuncaoBibliotecaGlobal.subElementos.length > 0) {
|
|
2696
|
+
const erros = this.validarArgumentosEntidadeChamada(informacoesFuncaoBibliotecaGlobal.subElementos, argumentos);
|
|
2697
|
+
if (erros.length > 0) {
|
|
2698
|
+
throw new erro_avaliador_sintatico_1.ErroAvaliadorSintatico(entidadeChamadaResolvidaVariavel.simbolo, `Erros ao resolver argumentos de chamada a ${entidadeChamadaResolvidaVariavel.simbolo.lexema}: \n${erros.reduce((mensagem, erro) => (mensagem += `${erro}\n`), '')}`);
|
|
2699
|
+
}
|
|
2700
|
+
return entidadeChamadaResolvidaVariavel;
|
|
2701
|
+
}
|
|
2682
2702
|
if (tipoPrimitiva === 'qualquer') {
|
|
2683
2703
|
// Provavelmente uma chamada a alguma função da biblioteca global.
|
|
2684
2704
|
// Até então, é sempre do tipo `InformacaoElementoSintatico`.
|
|
@@ -4728,7 +4748,7 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
4728
4748
|
}
|
|
4729
4749
|
exports.AvaliadorSintatico = AvaliadorSintatico;
|
|
4730
4750
|
|
|
4731
|
-
},{"../bibliotecas/primitivas-dicionario":29,"../bibliotecas/primitivas-numero":30,"../bibliotecas/primitivas-texto":31,"../bibliotecas/primitivas-vetor":32,"../construtos":62,"../construtos/tuplas":80,"../declaracoes":110,"../inferenciador":137,"../informacao-elemento-sintatico":138,"../tipos-de-dados/delegua":217,"../tipos-de-simbolos/delegua":222,"./avaliador-sintatico-base":9,"./comum":11,"./elemento-montao-tipos":19,"./erro-avaliador-sintatico":20,"./informacao-escopo":22,"./montao-tipos":25,"./pilha-escopos":26,"browser-process-hrtime":
|
|
4751
|
+
},{"../bibliotecas/primitivas-dicionario":29,"../bibliotecas/primitivas-numero":30,"../bibliotecas/primitivas-texto":31,"../bibliotecas/primitivas-vetor":32,"../construtos":62,"../construtos/tuplas":80,"../declaracoes":110,"../inferenciador":137,"../informacao-elemento-sintatico":138,"../tipos-de-dados/delegua":217,"../tipos-de-simbolos/delegua":222,"./avaliador-sintatico-base":9,"./comum":11,"./elemento-montao-tipos":19,"./erro-avaliador-sintatico":20,"./informacao-escopo":22,"./montao-tipos":25,"./pilha-escopos":26,"browser-process-hrtime":415}],11:[function(require,module,exports){
|
|
4732
4752
|
"use strict";
|
|
4733
4753
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4734
4754
|
exports.buscarRetornos = buscarRetornos;
|
|
@@ -6264,7 +6284,7 @@ class AvaliadorSintaticoPitugues {
|
|
|
6264
6284
|
while (this.verificarSeSimboloAtualEIgualA(pitugues_2.default.SE)) {
|
|
6265
6285
|
const operador = this.simbolos[this.atual - 1];
|
|
6266
6286
|
const expressaoOuCondicao = await this.seTernario();
|
|
6267
|
-
this.consumir(pitugues_2.default.SENAO, `Esperado 'senão' ou 'senao' após caminho positivo em se ternário. Atual:
|
|
6287
|
+
this.consumir(pitugues_2.default.SENAO, `Esperado 'senão' ou 'senao' após caminho positivo em se ternário. Atual:
|
|
6268
6288
|
${this.simbolos[this.atual].lexema}.`);
|
|
6269
6289
|
const expressaoSenao = await this.seTernario();
|
|
6270
6290
|
expressaoEntao = new construtos_1.SeTernario(this.hashArquivo, expressaoOuCondicao, expressaoEntao, operador, expressaoSenao);
|
|
@@ -6373,12 +6393,8 @@ class AvaliadorSintaticoPitugues {
|
|
|
6373
6393
|
}
|
|
6374
6394
|
else {
|
|
6375
6395
|
// Bloco de múltiplas linhas baseado em indentação
|
|
6376
|
-
let espacosAtual = this
|
|
6377
|
-
|
|
6378
|
-
.espacosIndentacao;
|
|
6379
|
-
const espacosAnterior = this
|
|
6380
|
-
.localizacoes[simboloAnterior.linha]
|
|
6381
|
-
.espacosIndentacao;
|
|
6396
|
+
let espacosAtual = this.localizacoes[simboloAtual.linha].espacosIndentacao;
|
|
6397
|
+
const espacosAnterior = this.localizacoes[simboloAnterior.linha].espacosIndentacao;
|
|
6382
6398
|
if (espacosAtual <= espacosAnterior) {
|
|
6383
6399
|
throw this.erro(simboloAtual, `Indentação inconsistente na linha ${simboloAtual.linha}. ` +
|
|
6384
6400
|
`Esperado: >= ${espacosAnterior}. ` +
|
|
@@ -6392,9 +6408,7 @@ class AvaliadorSintaticoPitugues {
|
|
|
6392
6408
|
declaracoes = declaracoes.concat(retorno);
|
|
6393
6409
|
simboloAtual = this.simboloAtual();
|
|
6394
6410
|
if (simboloAtual) {
|
|
6395
|
-
espacosAtual = this
|
|
6396
|
-
.localizacoes[simboloAtual.linha]
|
|
6397
|
-
.espacosIndentacao;
|
|
6411
|
+
espacosAtual = this.localizacoes[simboloAtual.linha].espacosIndentacao;
|
|
6398
6412
|
}
|
|
6399
6413
|
}
|
|
6400
6414
|
}
|
|
@@ -7201,7 +7215,7 @@ class AvaliadorSintaticoPitugues {
|
|
|
7201
7215
|
}
|
|
7202
7216
|
exports.AvaliadorSintaticoPitugues = AvaliadorSintaticoPitugues;
|
|
7203
7217
|
|
|
7204
|
-
},{"../../bibliotecas/dialetos/pitugues/primitivas-tupla":28,"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../declaracoes":110,"../../inferenciador":137,"../../informacao-elemento-sintatico":138,"../../lexador":207,"../../lexador/micro-lexador-pitugues":212,"../../tipos-de-dados/dialetos/pitugues":218,"../../tipos-de-simbolos/pitugues":226,"../comum":11,"../erro-avaliador-sintatico":20,"../informacao-escopo":22,"../pilha-escopos":26,"./micro-avaliador-sintatico-pitugues":18,"browser-process-hrtime":
|
|
7218
|
+
},{"../../bibliotecas/dialetos/pitugues/primitivas-tupla":28,"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../declaracoes":110,"../../inferenciador":137,"../../informacao-elemento-sintatico":138,"../../lexador":207,"../../lexador/micro-lexador-pitugues":212,"../../tipos-de-dados/dialetos/pitugues":218,"../../tipos-de-simbolos/pitugues":226,"../comum":11,"../erro-avaliador-sintatico":20,"../informacao-escopo":22,"../pilha-escopos":26,"./micro-avaliador-sintatico-pitugues":18,"browser-process-hrtime":415}],14:[function(require,module,exports){
|
|
7205
7219
|
"use strict";
|
|
7206
7220
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7207
7221
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -8124,7 +8138,7 @@ class AvaliadorSintaticoPrisma extends avaliador_sintatico_base_1.AvaliadorSinta
|
|
|
8124
8138
|
}
|
|
8125
8139
|
exports.AvaliadorSintaticoPrisma = AvaliadorSintaticoPrisma;
|
|
8126
8140
|
|
|
8127
|
-
},{"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../declaracoes":110,"../../inferenciador":137,"../../informacao-elemento-sintatico":138,"../../lexador":207,"../../tipos-de-simbolos/prisma":228,"../avaliador-sintatico-base":9,"../comum":11,"../informacao-escopo":22,"../pilha-escopos":26,"browser-process-hrtime":
|
|
8141
|
+
},{"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../declaracoes":110,"../../inferenciador":137,"../../informacao-elemento-sintatico":138,"../../lexador":207,"../../tipos-de-simbolos/prisma":228,"../avaliador-sintatico-base":9,"../comum":11,"../informacao-escopo":22,"../pilha-escopos":26,"browser-process-hrtime":415}],16:[function(require,module,exports){
|
|
8128
8142
|
"use strict";
|
|
8129
8143
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8130
8144
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -8313,6 +8327,16 @@ class AvaliadorSintaticoTenda extends avaliador_sintatico_base_1.AvaliadorSintat
|
|
|
8313
8327
|
this.avancarEDevolverAnterior();
|
|
8314
8328
|
return new construtos_1.ExpressaoRegular(this.hashArquivo, simboloAtual, valor);
|
|
8315
8329
|
}
|
|
8330
|
+
case tenda_1.default.BIBLIOTECA_GLOBAL: {
|
|
8331
|
+
const simboloBiblioteca = this.avancarEDevolverAnterior();
|
|
8332
|
+
return new construtos_1.Variavel(this.hashArquivo, simboloBiblioteca, 'qualquer');
|
|
8333
|
+
}
|
|
8334
|
+
case tenda_1.default.INFINITO:
|
|
8335
|
+
this.avancarEDevolverAnterior();
|
|
8336
|
+
return new construtos_1.Literal(this.hashArquivo, Number(simboloAtual.linha), Infinity, 'número');
|
|
8337
|
+
case tenda_1.default.NAN:
|
|
8338
|
+
this.avancarEDevolverAnterior();
|
|
8339
|
+
return new construtos_1.Literal(this.hashArquivo, Number(simboloAtual.linha), NaN, 'número');
|
|
8316
8340
|
case tenda_1.default.FALSO:
|
|
8317
8341
|
this.avancarEDevolverAnterior();
|
|
8318
8342
|
return new construtos_1.Literal(this.hashArquivo, Number(simboloAtual.linha), false, 'lógico');
|
|
@@ -8371,6 +8395,7 @@ class AvaliadorSintaticoTenda extends avaliador_sintatico_base_1.AvaliadorSintat
|
|
|
8371
8395
|
throw this.erro(this.simbolos[this.atual], 'Esperado expressão.');
|
|
8372
8396
|
}
|
|
8373
8397
|
async chamar() {
|
|
8398
|
+
var _a;
|
|
8374
8399
|
let expressao = await this.primario();
|
|
8375
8400
|
while (true) {
|
|
8376
8401
|
let tipoPrimitiva = undefined;
|
|
@@ -8378,7 +8403,21 @@ class AvaliadorSintaticoTenda extends avaliador_sintatico_base_1.AvaliadorSintat
|
|
|
8378
8403
|
expressao = await this.finalizarChamada(expressao, tipoPrimitiva);
|
|
8379
8404
|
}
|
|
8380
8405
|
else if (this.verificarSeSimboloAtualEIgualA(tenda_1.default.PONTO)) {
|
|
8381
|
-
|
|
8406
|
+
// Alguns tokens de biblioteca global são palavras reservadas (ex: `exiba`, `leia`, `entrada`),
|
|
8407
|
+
// mas precisam ser aceitos como nomes de métodos após o ponto.
|
|
8408
|
+
const tiposAceitosComoNomeDeMetodo = [
|
|
8409
|
+
tenda_1.default.IDENTIFICADOR,
|
|
8410
|
+
tenda_1.default.EXIBA,
|
|
8411
|
+
tenda_1.default.LEIA,
|
|
8412
|
+
tenda_1.default.ENTRADA,
|
|
8413
|
+
];
|
|
8414
|
+
let nome;
|
|
8415
|
+
if (tiposAceitosComoNomeDeMetodo.includes((_a = this.simbolos[this.atual]) === null || _a === void 0 ? void 0 : _a.tipo)) {
|
|
8416
|
+
nome = this.avancarEDevolverAnterior();
|
|
8417
|
+
}
|
|
8418
|
+
else {
|
|
8419
|
+
nome = this.consumir(tenda_1.default.IDENTIFICADOR, "Esperado nome de método ou propriedade após '.'.");
|
|
8420
|
+
}
|
|
8382
8421
|
tipoPrimitiva = expressao.tipo;
|
|
8383
8422
|
expressao = new construtos_1.AcessoMetodoOuPropriedade(this.hashArquivo, expressao, nome);
|
|
8384
8423
|
}
|
|
@@ -8919,7 +8958,9 @@ class AvaliadorSintaticoTenda extends avaliador_sintatico_base_1.AvaliadorSintat
|
|
|
8919
8958
|
if (this.primitivasConhecidas.hasOwnProperty(entidadeChamadaAcessoMetodoOuPropriedade.simbolo.lexema)) {
|
|
8920
8959
|
return this.primitivasConhecidas[entidadeChamadaAcessoMetodoOuPropriedade.simbolo.lexema].tipo;
|
|
8921
8960
|
}
|
|
8922
|
-
|
|
8961
|
+
// Para métodos de namespaces da biblioteca global (Lista, Matemática, etc.),
|
|
8962
|
+
// o tipo não é conhecido estaticamente. Retorna 'qualquer'.
|
|
8963
|
+
return 'qualquer';
|
|
8923
8964
|
case construtos_1.AcessoPropriedade:
|
|
8924
8965
|
const entidadeChamadaAcessoPropriedade = entidadeChamadaChamada;
|
|
8925
8966
|
return entidadeChamadaAcessoPropriedade.tipoRetornoPropriedade;
|
|
@@ -9067,6 +9108,10 @@ class AvaliadorSintaticoTenda extends avaliador_sintatico_base_1.AvaliadorSintat
|
|
|
9067
9108
|
inicializarPilhaEscopos() {
|
|
9068
9109
|
this.pilhaEscopos = new pilha_escopos_1.PilhaEscopos();
|
|
9069
9110
|
this.pilhaEscopos.empilhar(new informacao_escopo_1.InformacaoEscopo());
|
|
9111
|
+
// Registrar namespaces da biblioteca global de Tenda.
|
|
9112
|
+
for (const nomeBiblioteca of ['Data', 'Lista', 'Matemática', 'Saída', 'Texto']) {
|
|
9113
|
+
this.pilhaEscopos.definirInformacoesVariavel(nomeBiblioteca, new informacao_elemento_sintatico_1.InformacaoElementoSintatico(nomeBiblioteca, 'qualquer'));
|
|
9114
|
+
}
|
|
9070
9115
|
// TODO: Escrever algum tipo de validação aqui.
|
|
9071
9116
|
for (const tipos of Object.values(this.tiposDeFerramentasExternas)) {
|
|
9072
9117
|
for (const [nomeTipo, tipo] of Object.entries(tipos)) {
|
|
@@ -9106,7 +9151,7 @@ class AvaliadorSintaticoTenda extends avaliador_sintatico_base_1.AvaliadorSintat
|
|
|
9106
9151
|
}
|
|
9107
9152
|
exports.AvaliadorSintaticoTenda = AvaliadorSintaticoTenda;
|
|
9108
9153
|
|
|
9109
|
-
},{"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../construtos/tuplas":80,"../../declaracoes":110,"../../inferenciador":137,"../../informacao-elemento-sintatico":138,"../../lexador/simbolo":215,"../../tipos-de-dados/delegua":217,"../../tipos-de-simbolos/tenda":229,"../avaliador-sintatico-base":9,"./../erro-avaliador-sintatico":20,"./../informacao-escopo":22,"./../pilha-escopos":26,"browser-process-hrtime":
|
|
9154
|
+
},{"../../bibliotecas/primitivas-dicionario":29,"../../bibliotecas/primitivas-numero":30,"../../bibliotecas/primitivas-texto":31,"../../bibliotecas/primitivas-vetor":32,"../../construtos":62,"../../construtos/tuplas":80,"../../declaracoes":110,"../../inferenciador":137,"../../informacao-elemento-sintatico":138,"../../lexador/simbolo":215,"../../tipos-de-dados/delegua":217,"../../tipos-de-simbolos/tenda":229,"../avaliador-sintatico-base":9,"./../erro-avaliador-sintatico":20,"./../informacao-escopo":22,"./../pilha-escopos":26,"browser-process-hrtime":415}],17:[function(require,module,exports){
|
|
9110
9155
|
"use strict";
|
|
9111
9156
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9112
9157
|
if (k2 === undefined) k2 = k;
|
|
@@ -10065,15 +10110,13 @@ async function aleatorio(interpretador) {
|
|
|
10065
10110
|
* @returns {Promise<number>} Um número real entre os valores máximo e mínimo especificados.
|
|
10066
10111
|
*/
|
|
10067
10112
|
async function aleatorioEntre(interpretador, minimo, maximo) {
|
|
10068
|
-
if (arguments.length <=
|
|
10113
|
+
if (arguments.length <= 1) {
|
|
10069
10114
|
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
10070
10115
|
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
10071
10116
|
linha: interpretador.linhaDeclaracaoAtual,
|
|
10072
10117
|
}, 'A função recebe ao menos um parâmetro.'));
|
|
10073
10118
|
}
|
|
10074
|
-
const valorMinimo =
|
|
10075
|
-
? minimo.valor
|
|
10076
|
-
: minimo;
|
|
10119
|
+
const valorMinimo = interpretador.resolverValor(minimo);
|
|
10077
10120
|
if (arguments.length === 2) {
|
|
10078
10121
|
if (typeof valorMinimo !== 'number') {
|
|
10079
10122
|
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
@@ -10089,9 +10132,7 @@ async function aleatorioEntre(interpretador, minimo, maximo) {
|
|
|
10089
10132
|
linha: interpretador.linhaDeclaracaoAtual,
|
|
10090
10133
|
}, 'A quantidade de parâmetros máxima para esta função é 2.'));
|
|
10091
10134
|
}
|
|
10092
|
-
const valorMaximo =
|
|
10093
|
-
? maximo.valor
|
|
10094
|
-
: maximo;
|
|
10135
|
+
const valorMaximo = interpretador.resolverValor(maximo);
|
|
10095
10136
|
if (typeof valorMinimo !== 'number' || typeof valorMaximo !== 'number') {
|
|
10096
10137
|
return Promise.reject(new excecoes_1.ErroEmTempoDeExecucao({
|
|
10097
10138
|
hashArquivo: interpretador.hashArquivoDeclaracaoAtual,
|
|
@@ -21046,7 +21087,7 @@ class InterpretadorBase {
|
|
|
21046
21087
|
exports.InterpretadorBase = InterpretadorBase;
|
|
21047
21088
|
|
|
21048
21089
|
}).call(this)}).call(this,require('_process'),require("timers").setImmediate)
|
|
21049
|
-
},{"../avaliador-sintatico":21,"../bibliotecas/primitivas-dicionario":29,"../bibliotecas/primitivas-vetor":32,"../construtos":62,"../excecoes":131,"../inferenciador":137,"../lexador":207,"../quebras":216,"../tipos-de-dados/delegua":217,"../tipos-de-dados/primitivos":219,"../tipos-de-simbolos/delegua":222,"./espaco-memoria":171,"./estruturas":179,"./estruturas/metodo-primitiva":181,"./pilha-escopos-execucao":191,"_process":
|
|
21090
|
+
},{"../avaliador-sintatico":21,"../bibliotecas/primitivas-dicionario":29,"../bibliotecas/primitivas-vetor":32,"../construtos":62,"../excecoes":131,"../inferenciador":137,"../lexador":207,"../quebras":216,"../tipos-de-dados/delegua":217,"../tipos-de-dados/primitivos":219,"../tipos-de-simbolos/delegua":222,"./espaco-memoria":171,"./estruturas":179,"./estruturas/metodo-primitiva":181,"./pilha-escopos-execucao":191,"_process":469,"browser-process-hrtime":415,"timers":472}],189:[function(require,module,exports){
|
|
21050
21091
|
"use strict";
|
|
21051
21092
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21052
21093
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -21087,6 +21128,27 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
21087
21128
|
pontoInicializacaoBibliotecasGlobais() {
|
|
21088
21129
|
(0, comum_1.carregarBibliotecasGlobais)(this.pilhaEscoposExecucao);
|
|
21089
21130
|
}
|
|
21131
|
+
async avaliarArgumentosEscreva(argumentos) {
|
|
21132
|
+
if (this.constructor !== Interpretador) {
|
|
21133
|
+
return await super.avaliarArgumentosEscreva(argumentos);
|
|
21134
|
+
}
|
|
21135
|
+
let formatoTexto = '';
|
|
21136
|
+
for (const argumento of argumentos) {
|
|
21137
|
+
let resultadoAvaliacao = await this.avaliar(argumento);
|
|
21138
|
+
if (resultadoAvaliacao &&
|
|
21139
|
+
resultadoAvaliacao.hasOwnProperty &&
|
|
21140
|
+
resultadoAvaliacao.hasOwnProperty('valorRetornado')) {
|
|
21141
|
+
resultadoAvaliacao = resultadoAvaliacao.valorRetornado;
|
|
21142
|
+
}
|
|
21143
|
+
if (argumento instanceof construtos_1.Atribuir || argumento instanceof construtos_1.AtribuicaoPorIndice) {
|
|
21144
|
+
formatoTexto += `${argumento.paraTexto()} `;
|
|
21145
|
+
continue;
|
|
21146
|
+
}
|
|
21147
|
+
const valor = this.resolverValor(resultadoAvaliacao);
|
|
21148
|
+
formatoTexto += `${this.paraTexto(valor)} `;
|
|
21149
|
+
}
|
|
21150
|
+
return formatoTexto.trimEnd();
|
|
21151
|
+
}
|
|
21090
21152
|
resolverReferenciaMontao(referenciaMontao) {
|
|
21091
21153
|
const valorMontao = this.montao.obterReferencia(this.hashArquivoDeclaracaoAtual, this.linhaDeclaracaoAtual, referenciaMontao.endereco);
|
|
21092
21154
|
return valorMontao;
|
|
@@ -21248,7 +21310,9 @@ class Interpretador extends interpretador_base_1.InterpretadorBase {
|
|
|
21248
21310
|
const nomeDecorador = decorador.nome.slice(1);
|
|
21249
21311
|
const variavelDecoradora = this.pilhaEscoposExecucao.obterVariavelPorNome(nomeDecorador);
|
|
21250
21312
|
const funcaoDecoradora = variavelDecoradora.valor;
|
|
21251
|
-
const resultado = await funcaoDecoradora.chamar(this, [
|
|
21313
|
+
const resultado = await funcaoDecoradora.chamar(this, [
|
|
21314
|
+
{ nome: null, valor: funcao },
|
|
21315
|
+
]);
|
|
21252
21316
|
funcao = this.resolverValorRecursivo(resultado);
|
|
21253
21317
|
}
|
|
21254
21318
|
}
|
|
@@ -22363,6 +22427,7 @@ const lexador_1 = require("../lexador");
|
|
|
22363
22427
|
const inferenciador_1 = require("../inferenciador");
|
|
22364
22428
|
const delegua_1 = __importDefault(require("../tipos-de-dados/delegua"));
|
|
22365
22429
|
const tiposNumericos = ['inteiro', 'número', 'numero', 'real', 'longo'];
|
|
22430
|
+
const tiposLogicos = ['logico', 'lógico'];
|
|
22366
22431
|
class PilhaEscoposExecucao {
|
|
22367
22432
|
constructor() {
|
|
22368
22433
|
this.pilha = [];
|
|
@@ -22394,6 +22459,8 @@ class PilhaEscoposExecucao {
|
|
|
22394
22459
|
return true;
|
|
22395
22460
|
if (tiposNumericos.includes(tipoVariavel) && tiposNumericos.includes(tipoValor))
|
|
22396
22461
|
return true;
|
|
22462
|
+
if (tiposLogicos.includes(tipoVariavel) && tiposLogicos.includes(tipoValor))
|
|
22463
|
+
return true;
|
|
22397
22464
|
return false;
|
|
22398
22465
|
}
|
|
22399
22466
|
converterValor(tipo, valor) {
|
|
@@ -22808,6 +22875,24 @@ class LexadorCalango {
|
|
|
22808
22875
|
const textoCompleto = this.codigo[this.linha].substring(this.inicioSimbolo + 1, this.atual);
|
|
22809
22876
|
this.simbolos.push(new simbolo_1.Simbolo(calango_2.default.TEXTO, textoCompleto, textoCompleto, linhaPrimeiroCaracter + 1, this.hashArquivo));
|
|
22810
22877
|
}
|
|
22878
|
+
analisarCaracter() {
|
|
22879
|
+
const linhaPrimeiroCaracter = this.linha;
|
|
22880
|
+
// Restringe leitura à linha atual (como analisarNumero), evitando
|
|
22881
|
+
// que avancar() mude this.linha e corrompa o cálculo do substring.
|
|
22882
|
+
while (this.simboloAtual() !== "'" && this.linha === linhaPrimeiroCaracter && !this.eFinalDoCodigo()) {
|
|
22883
|
+
this.avancar();
|
|
22884
|
+
}
|
|
22885
|
+
if (this.linha !== linhaPrimeiroCaracter || this.eFinalDoCodigo()) {
|
|
22886
|
+
this.erros.push({
|
|
22887
|
+
linha: linhaPrimeiroCaracter + 1,
|
|
22888
|
+
caractere: this.simboloAnterior(),
|
|
22889
|
+
mensagem: 'Caractere não finalizado.',
|
|
22890
|
+
});
|
|
22891
|
+
return;
|
|
22892
|
+
}
|
|
22893
|
+
const valorCaracter = this.codigo[linhaPrimeiroCaracter].substring(this.inicioSimbolo + 1, this.atual);
|
|
22894
|
+
this.simbolos.push(new simbolo_1.Simbolo(calango_2.default.LITERAL_CARACTER, valorCaracter, valorCaracter, linhaPrimeiroCaracter + 1, this.hashArquivo));
|
|
22895
|
+
}
|
|
22811
22896
|
analisarNumero() {
|
|
22812
22897
|
const linhaPrimeiroDigito = this.linha;
|
|
22813
22898
|
while (this.eDigito(this.simboloAtual()) && this.linha === linhaPrimeiroDigito) {
|
|
@@ -22870,6 +22955,23 @@ class LexadorCalango {
|
|
|
22870
22955
|
this.analisarTexto('"');
|
|
22871
22956
|
this.avancar();
|
|
22872
22957
|
break;
|
|
22958
|
+
case "'":
|
|
22959
|
+
this.avancar();
|
|
22960
|
+
this.analisarCaracter();
|
|
22961
|
+
this.avancar();
|
|
22962
|
+
break;
|
|
22963
|
+
case ':':
|
|
22964
|
+
this.adicionarSimbolo(calango_2.default.DOIS_PONTOS);
|
|
22965
|
+
this.avancar();
|
|
22966
|
+
break;
|
|
22967
|
+
case '[':
|
|
22968
|
+
this.adicionarSimbolo(calango_2.default.COLCHETE_ESQUERDO);
|
|
22969
|
+
this.avancar();
|
|
22970
|
+
break;
|
|
22971
|
+
case ']':
|
|
22972
|
+
this.adicionarSimbolo(calango_2.default.COLCHETE_DIREITO);
|
|
22973
|
+
this.avancar();
|
|
22974
|
+
break;
|
|
22873
22975
|
case '(':
|
|
22874
22976
|
this.adicionarSimbolo(calango_2.default.PARENTESE_ESQUERDO);
|
|
22875
22977
|
this.avancar();
|
|
@@ -22878,6 +22980,36 @@ class LexadorCalango {
|
|
|
22878
22980
|
this.adicionarSimbolo(calango_2.default.PARENTESE_DIREITO);
|
|
22879
22981
|
this.avancar();
|
|
22880
22982
|
break;
|
|
22983
|
+
case ',':
|
|
22984
|
+
this.adicionarSimbolo(calango_2.default.VIRGULA);
|
|
22985
|
+
this.avancar();
|
|
22986
|
+
break;
|
|
22987
|
+
case '+':
|
|
22988
|
+
this.adicionarSimbolo(calango_2.default.ADICAO);
|
|
22989
|
+
this.avancar();
|
|
22990
|
+
break;
|
|
22991
|
+
case '-':
|
|
22992
|
+
this.adicionarSimbolo(calango_2.default.SUBTRACAO);
|
|
22993
|
+
this.avancar();
|
|
22994
|
+
break;
|
|
22995
|
+
case '*':
|
|
22996
|
+
this.adicionarSimbolo(calango_2.default.MULTIPLICACAO);
|
|
22997
|
+
this.avancar();
|
|
22998
|
+
break;
|
|
22999
|
+
case '/':
|
|
23000
|
+
if (this.proximoSimbolo() === '/') {
|
|
23001
|
+
// Comentário de linha: consumir até ao fim da linha sem emitir símbolo.
|
|
23002
|
+
// Guardamos o número da linha para parar quando avancar() mudar para a próxima.
|
|
23003
|
+
const linhaComentario = this.linha;
|
|
23004
|
+
while (this.linha === linhaComentario && !this.eFinalDoCodigo()) {
|
|
23005
|
+
this.avancar();
|
|
23006
|
+
}
|
|
23007
|
+
}
|
|
23008
|
+
else {
|
|
23009
|
+
this.adicionarSimbolo(calango_2.default.DIVISAO);
|
|
23010
|
+
this.avancar();
|
|
23011
|
+
}
|
|
23012
|
+
break;
|
|
22881
23013
|
case '=':
|
|
22882
23014
|
this.adicionarSimbolo(calango_2.default.IGUAL_ATRIBUICAO);
|
|
22883
23015
|
this.avancar();
|
|
@@ -22898,10 +23030,22 @@ class LexadorCalango {
|
|
|
22898
23030
|
this.adicionarSimbolo(calango_2.default.MENOR_IGUAL, '<=');
|
|
22899
23031
|
this.avancar();
|
|
22900
23032
|
}
|
|
23033
|
+
else if (this.simboloAtual() === '>') {
|
|
23034
|
+
this.adicionarSimbolo(calango_2.default.DIFERENTE, '<>');
|
|
23035
|
+
this.avancar();
|
|
23036
|
+
}
|
|
22901
23037
|
else {
|
|
22902
23038
|
this.adicionarSimbolo(calango_2.default.MENOR);
|
|
22903
23039
|
}
|
|
22904
23040
|
break;
|
|
23041
|
+
case '%':
|
|
23042
|
+
this.adicionarSimbolo(calango_2.default.MODULO);
|
|
23043
|
+
this.avancar();
|
|
23044
|
+
break;
|
|
23045
|
+
case '^':
|
|
23046
|
+
this.adicionarSimbolo(calango_2.default.EXPONENCIACAO);
|
|
23047
|
+
this.avancar();
|
|
23048
|
+
break;
|
|
22905
23049
|
default:
|
|
22906
23050
|
if (this.eDigito(caractere))
|
|
22907
23051
|
this.analisarNumero();
|
|
@@ -23555,15 +23699,13 @@ class LexadorPitugues {
|
|
|
23555
23699
|
}
|
|
23556
23700
|
analisarNumero() {
|
|
23557
23701
|
const linhaInicial = this.linha;
|
|
23558
|
-
while (this.linha === linhaInicial &&
|
|
23559
|
-
this.eDigito(this.simboloAtual()))
|
|
23702
|
+
while (this.linha === linhaInicial && this.eDigito(this.simboloAtual()))
|
|
23560
23703
|
this.avancar();
|
|
23561
23704
|
const temPonto = this.simboloAtual() === '.';
|
|
23562
23705
|
const proximoEhDigito = this.eDigito(this.proximoSimbolo());
|
|
23563
23706
|
if (this.linha === linhaInicial && temPonto && proximoEhDigito) {
|
|
23564
23707
|
this.avancar();
|
|
23565
|
-
while (this.linha === linhaInicial &&
|
|
23566
|
-
this.eDigito(this.simboloAtual()))
|
|
23708
|
+
while (this.linha === linhaInicial && this.eDigito(this.simboloAtual()))
|
|
23567
23709
|
this.avancar();
|
|
23568
23710
|
}
|
|
23569
23711
|
let numeroCompleto;
|
|
@@ -23876,7 +24018,7 @@ class LexadorPitugues {
|
|
|
23876
24018
|
}
|
|
23877
24019
|
exports.LexadorPitugues = LexadorPitugues;
|
|
23878
24020
|
|
|
23879
|
-
},{"../../tipos-de-simbolos/pitugues":226,"../simbolo":215,"./palavras-reservadas/pitugues":203,"browser-process-hrtime":
|
|
24021
|
+
},{"../../tipos-de-simbolos/pitugues":226,"../simbolo":215,"./palavras-reservadas/pitugues":203,"browser-process-hrtime":415}],197:[function(require,module,exports){
|
|
23880
24022
|
"use strict";
|
|
23881
24023
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23882
24024
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -24516,7 +24658,7 @@ class LexadorPrisma {
|
|
|
24516
24658
|
}
|
|
24517
24659
|
exports.LexadorPrisma = LexadorPrisma;
|
|
24518
24660
|
|
|
24519
|
-
},{"../../tipos-de-simbolos/prisma":228,"../simbolo":215,"./palavras-reservadas/prisma":205,"browser-process-hrtime":
|
|
24661
|
+
},{"../../tipos-de-simbolos/prisma":228,"../simbolo":215,"./palavras-reservadas/prisma":205,"browser-process-hrtime":415}],199:[function(require,module,exports){
|
|
24520
24662
|
"use strict";
|
|
24521
24663
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
24522
24664
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -24910,7 +25052,7 @@ class LexadorTenda {
|
|
|
24910
25052
|
}
|
|
24911
25053
|
exports.LexadorTenda = LexadorTenda;
|
|
24912
25054
|
|
|
24913
|
-
},{"../../tipos-de-simbolos/tenda":229,"../simbolo":215,"./palavras-reservadas/tenda":206,"browser-process-hrtime":
|
|
25055
|
+
},{"../../tipos-de-simbolos/tenda":229,"../simbolo":215,"./palavras-reservadas/tenda":206,"browser-process-hrtime":415}],200:[function(require,module,exports){
|
|
24914
25056
|
"use strict";
|
|
24915
25057
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
24916
25058
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -24919,16 +25061,43 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
24919
25061
|
const calango_1 = __importDefault(require("../../../tipos-de-simbolos/calango"));
|
|
24920
25062
|
exports.default = {
|
|
24921
25063
|
algoritmo: calango_1.default.ALGORITMO,
|
|
24922
|
-
|
|
24923
|
-
|
|
25064
|
+
ate: calango_1.default.ATE,
|
|
25065
|
+
caracter: calango_1.default.CARACTER,
|
|
25066
|
+
caso: calango_1.default.CASO,
|
|
25067
|
+
de: calango_1.default.DE,
|
|
25068
|
+
div: calango_1.default.DIVISAO_INTEIRA,
|
|
25069
|
+
escolha: calango_1.default.ESCOLHA,
|
|
25070
|
+
enquanto: calango_1.default.ENQUANTO,
|
|
25071
|
+
entao: calango_1.default.ENTAO,
|
|
24924
25072
|
escreva: calango_1.default.ESCREVA,
|
|
24925
25073
|
escreval: calango_1.default.ESCREVAL,
|
|
25074
|
+
faca: calango_1.default.FACA,
|
|
25075
|
+
falso: calango_1.default.FALSO,
|
|
25076
|
+
fimEnquanto: calango_1.default.FIM_ENQUANTO,
|
|
25077
|
+
fimEscolha: calango_1.default.FIM_ESCOLHA,
|
|
25078
|
+
fimFuncao: calango_1.default.FIM_FUNCAO,
|
|
25079
|
+
fimPara: calango_1.default.FIM_PARA,
|
|
25080
|
+
fimProcedimento: calango_1.default.FIM_PROCEDIMENTO,
|
|
25081
|
+
fimPrincipal: calango_1.default.FIM_PRINCIPAL,
|
|
25082
|
+
fimSe: calango_1.default.FIM_SE,
|
|
25083
|
+
outroCaso: calango_1.default.OUTRO_CASO,
|
|
25084
|
+
procedimento: calango_1.default.PROCEDIMENTO,
|
|
24926
25085
|
inteiro: calango_1.default.INTEIRO,
|
|
25086
|
+
funcao: calango_1.default.FUNCAO,
|
|
25087
|
+
interrompa: calango_1.default.INTERROMPA,
|
|
24927
25088
|
leia: calango_1.default.LEIA,
|
|
25089
|
+
logico: calango_1.default.LOGICO,
|
|
25090
|
+
mod: calango_1.default.MODULO,
|
|
25091
|
+
nao: calango_1.default.NEGACAO,
|
|
25092
|
+
para: calango_1.default.PARA,
|
|
25093
|
+
passo: calango_1.default.PASSO,
|
|
25094
|
+
principal: calango_1.default.PRINCIPAL,
|
|
25095
|
+
real: calango_1.default.REAL,
|
|
25096
|
+
retorna: calango_1.default.RETORNA,
|
|
24928
25097
|
se: calango_1.default.SE,
|
|
24929
|
-
entao: calango_1.default.ENTAO,
|
|
24930
25098
|
senao: calango_1.default.SENAO,
|
|
24931
|
-
|
|
25099
|
+
texto: calango_1.default.TIPO_TEXTO,
|
|
25100
|
+
verdadeiro: calango_1.default.VERDADEIRO,
|
|
24932
25101
|
};
|
|
24933
25102
|
|
|
24934
25103
|
},{"../../../tipos-de-simbolos/calango":220}],201:[function(require,module,exports){
|
|
@@ -26027,7 +26196,7 @@ class Lexador {
|
|
|
26027
26196
|
}
|
|
26028
26197
|
exports.Lexador = Lexador;
|
|
26029
26198
|
|
|
26030
|
-
},{"../tipos-de-simbolos/delegua":222,"./palavras-reservadas":214,"./simbolo":215,"browser-process-hrtime":
|
|
26199
|
+
},{"../tipos-de-simbolos/delegua":222,"./palavras-reservadas":214,"./simbolo":215,"browser-process-hrtime":415}],211:[function(require,module,exports){
|
|
26031
26200
|
"use strict";
|
|
26032
26201
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26033
26202
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -26901,14 +27070,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26901
27070
|
exports.default = {
|
|
26902
27071
|
ADICAO: 'ADICAO',
|
|
26903
27072
|
ALGORITMO: 'ALGORITMO',
|
|
27073
|
+
CARACTER: 'CARACTER',
|
|
26904
27074
|
DIFERENTE: 'DIFERENTE',
|
|
26905
27075
|
DIVISAO: 'DIVISAO',
|
|
26906
27076
|
DIVISAO_INTEIRA: 'DIVISAO_INTEIRA',
|
|
26907
27077
|
E: 'E',
|
|
27078
|
+
ENQUANTO: 'ENQUANTO',
|
|
26908
27079
|
ENTAO: 'ENTAO',
|
|
26909
27080
|
ESCREVA: 'ESCREVA',
|
|
26910
27081
|
ESCREVAL: 'ESCREVAL',
|
|
26911
27082
|
EXPONENCIACAO: 'EXPONENCIACAO',
|
|
27083
|
+
FACA: 'FACA',
|
|
27084
|
+
FALSO: 'FALSO',
|
|
27085
|
+
ATE: 'ATE',
|
|
27086
|
+
CASO: 'CASO',
|
|
27087
|
+
COLCHETE_DIREITO: 'COLCHETE_DIREITO',
|
|
27088
|
+
COLCHETE_ESQUERDO: 'COLCHETE_ESQUERDO',
|
|
27089
|
+
DE: 'DE',
|
|
27090
|
+
DOIS_PONTOS: 'DOIS_PONTOS',
|
|
27091
|
+
ESCOLHA: 'ESCOLHA',
|
|
27092
|
+
FIM_ESCOLHA: 'FIM_ESCOLHA',
|
|
27093
|
+
FIM_FUNCAO: 'FIM_FUNCAO',
|
|
27094
|
+
FIM_PROCEDIMENTO: 'FIM_PROCEDIMENTO',
|
|
27095
|
+
FUNCAO: 'FUNCAO',
|
|
27096
|
+
FIM_ENQUANTO: 'FIM_ENQUANTO',
|
|
27097
|
+
FIM_PARA: 'FIM_PARA',
|
|
26912
27098
|
FIM_PRINCIPAL: 'FIM_PRINCIPAL',
|
|
26913
27099
|
FIM_SE: 'FIM_SE',
|
|
26914
27100
|
IDENTIFICADOR: 'IDENTIFICADOR',
|
|
@@ -26916,7 +27102,10 @@ exports.default = {
|
|
|
26916
27102
|
IGUAL_ATRIBUICAO: 'IGUAL_ATRIBUICAO',
|
|
26917
27103
|
IGUAL_IGUAL: 'IGUAL_IGUAL',
|
|
26918
27104
|
INTEIRO: 'INTEIRO',
|
|
27105
|
+
INTERROMPA: 'INTERROMPA',
|
|
26919
27106
|
LEIA: 'LEIA',
|
|
27107
|
+
LITERAL_CARACTER: 'LITERAL_CARACTER',
|
|
27108
|
+
LOGICO: 'LOGICO',
|
|
26920
27109
|
MAIOR: 'MAIOR',
|
|
26921
27110
|
MAIOR_IGUAL: 'MAIOR_IGUAL',
|
|
26922
27111
|
MENOR: 'MENOR',
|
|
@@ -26929,13 +27118,21 @@ exports.default = {
|
|
|
26929
27118
|
PARENTESE_DIREITO: 'PARENTESE_DIREITO',
|
|
26930
27119
|
PARENTESE_ESQUERDO: 'PARENTESE_ESQUERDO',
|
|
26931
27120
|
PRINCIPAL: 'PRINCIPAL',
|
|
27121
|
+
OUTRO_CASO: 'OUTRO_CASO',
|
|
27122
|
+
PARA: 'PARA',
|
|
27123
|
+
PROCEDIMENTO: 'PROCEDIMENTO',
|
|
27124
|
+
PASSO: 'PASSO',
|
|
26932
27125
|
PONTO: 'PONTO',
|
|
26933
27126
|
PONTO_E_VIRGULA: 'PONTO_E_VIRGULA',
|
|
26934
27127
|
QUEBRA_LINHA: 'QUEBRA_LINHA',
|
|
27128
|
+
REAL: 'REAL',
|
|
27129
|
+
RETORNA: 'RETORNA',
|
|
26935
27130
|
SE: 'SE',
|
|
26936
27131
|
SENAO: 'SENAO',
|
|
26937
27132
|
SUBTRACAO: 'SUBTRACAO',
|
|
26938
27133
|
TEXTO: 'TEXTO',
|
|
27134
|
+
TIPO_TEXTO: 'TIPO_TEXTO',
|
|
27135
|
+
VERDADEIRO: 'VERDADEIRO',
|
|
26939
27136
|
VIRGULA: 'VIRGULA',
|
|
26940
27137
|
};
|
|
26941
27138
|
|
|
@@ -27551,6 +27748,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
27551
27748
|
};
|
|
27552
27749
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27553
27750
|
__exportStar(require("./tradutor-assembly-arm"), exports);
|
|
27751
|
+
__exportStar(require("./tradutor-assembly-risc-v"), exports);
|
|
27752
|
+
__exportStar(require("./tradutor-webassembly"), exports);
|
|
27554
27753
|
__exportStar(require("./tradutor-assembly-x64"), exports);
|
|
27555
27754
|
__exportStar(require("./tradutor-assemblyscript"), exports);
|
|
27556
27755
|
__exportStar(require("./tradutor-calango"), exports);
|
|
@@ -27564,7 +27763,7 @@ __exportStar(require("./tradutor-reverso-python"), exports);
|
|
|
27564
27763
|
__exportStar(require("./tradutor-reverso-tenda"), exports);
|
|
27565
27764
|
__exportStar(require("./tradutor-ruby"), exports);
|
|
27566
27765
|
|
|
27567
|
-
},{"./tradutor-assembly-arm":239,"./tradutor-assembly-
|
|
27766
|
+
},{"./tradutor-assembly-arm":239,"./tradutor-assembly-risc-v":240,"./tradutor-assembly-x64":241,"./tradutor-assemblyscript":242,"./tradutor-calango":243,"./tradutor-elixir":244,"./tradutor-javascript":245,"./tradutor-mermaidjs":246,"./tradutor-portugol-ipt":247,"./tradutor-python":248,"./tradutor-reverso-javascript":249,"./tradutor-reverso-python":250,"./tradutor-reverso-tenda":251,"./tradutor-ruby":252,"./tradutor-webassembly":253}],231:[function(require,module,exports){
|
|
27568
27767
|
"use strict";
|
|
27569
27768
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27570
27769
|
exports.ArestaFluxograma = void 0;
|
|
@@ -28934,7 +29133,7 @@ __decorate([
|
|
|
28934
29133
|
Decorators_1.Override
|
|
28935
29134
|
], Python3Lexer.prototype, "nextToken", null);
|
|
28936
29135
|
|
|
28937
|
-
},{"./python3-parser":238,"antlr4ts/CommonToken":
|
|
29136
|
+
},{"./python3-parser":238,"antlr4ts/CommonToken":263,"antlr4ts/Decorators":267,"antlr4ts/Lexer":275,"antlr4ts/Token":292,"antlr4ts/VocabularyImpl":298,"antlr4ts/atn/ATNDeserializer":304,"antlr4ts/atn/LexerATNSimulator":325,"antlr4ts/misc/Utils":386}],238:[function(require,module,exports){
|
|
28938
29137
|
"use strict";
|
|
28939
29138
|
// Generated from fontes\tradutores\python\Python3.g4 by ANTLR 4.9.0-SNAPSHOT
|
|
28940
29139
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -40181,7 +40380,7 @@ class Yield_argContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
40181
40380
|
}
|
|
40182
40381
|
exports.Yield_argContext = Yield_argContext;
|
|
40183
40382
|
|
|
40184
|
-
},{"antlr4ts/FailedPredicateException":
|
|
40383
|
+
},{"antlr4ts/FailedPredicateException":271,"antlr4ts/NoViableAltException":279,"antlr4ts/Parser":280,"antlr4ts/ParserRuleContext":283,"antlr4ts/RecognitionException":286,"antlr4ts/Token":292,"antlr4ts/VocabularyImpl":298,"antlr4ts/atn/ATN":300,"antlr4ts/atn/ATNDeserializer":304,"antlr4ts/atn/ParserATNSimulator":341,"antlr4ts/misc/Utils":386}],239:[function(require,module,exports){
|
|
40185
40384
|
"use strict";
|
|
40186
40385
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40187
40386
|
exports.TradutorAssemblyARM = void 0;
|
|
@@ -40908,6 +41107,692 @@ exports.TradutorAssemblyARM = TradutorAssemblyARM;
|
|
|
40908
41107
|
},{"../construtos":62,"../declaracoes":110}],240:[function(require,module,exports){
|
|
40909
41108
|
"use strict";
|
|
40910
41109
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41110
|
+
exports.TradutorAssemblyRISCV = void 0;
|
|
41111
|
+
const construtos_1 = require("../construtos");
|
|
41112
|
+
const declaracoes_1 = require("../declaracoes");
|
|
41113
|
+
class TradutorAssemblyRISCV {
|
|
41114
|
+
constructor(alvo = 'linux-rv64') {
|
|
41115
|
+
this.alvo = alvo;
|
|
41116
|
+
this.indentacao = 0;
|
|
41117
|
+
this.contadorLabels = 0;
|
|
41118
|
+
this.variaveis = new Map();
|
|
41119
|
+
// s2-s9 são callee-saved — seguros para usar como scratch entre chamadas
|
|
41120
|
+
this.registradoresDisponiveis = ['s2', 's3', 's4', 's5', 's6', 's7', 's8', 's9'];
|
|
41121
|
+
this.pilhaRegistradores = [];
|
|
41122
|
+
this.bss = '.bss\n';
|
|
41123
|
+
this.data = '.data\n';
|
|
41124
|
+
this.dicionarioConstrutos = {
|
|
41125
|
+
AcessoIndiceVariavel: this.traduzirAcessoIndiceVariavel.bind(this),
|
|
41126
|
+
AcessoMetodoOuPropriedade: this.traduzirConstrutoAcessoMetodo.bind(this),
|
|
41127
|
+
Agrupamento: this.traduzirConstrutoAgrupamento.bind(this),
|
|
41128
|
+
AtribuicaoPorIndice: this.traduzirConstrutoAtribuicaoPorIndice.bind(this),
|
|
41129
|
+
Atribuir: this.traduzirConstrutoAtribuir.bind(this),
|
|
41130
|
+
Binario: this.traduzirConstrutoBinario.bind(this),
|
|
41131
|
+
Chamada: this.traduzirConstrutoChamada.bind(this),
|
|
41132
|
+
DefinirValor: this.traduzirConstrutoDefinirValor.bind(this),
|
|
41133
|
+
FuncaoConstruto: this.traduzirFuncaoConstruto.bind(this),
|
|
41134
|
+
Isto: () => 'this',
|
|
41135
|
+
Literal: this.traduzirConstrutoLiteral.bind(this),
|
|
41136
|
+
Logico: this.traduzirConstrutoLogico.bind(this),
|
|
41137
|
+
TipoDe: this.traduzirConstrutoTipoDe.bind(this),
|
|
41138
|
+
Unario: this.traduzirConstrutoUnario.bind(this),
|
|
41139
|
+
Variavel: this.traduzirConstrutoVariavel.bind(this),
|
|
41140
|
+
Vetor: this.traduzirConstrutoVetor.bind(this),
|
|
41141
|
+
};
|
|
41142
|
+
this.dicionarioDeclaracoes = {
|
|
41143
|
+
Bloco: this.traduzirDeclaracaoBloco.bind(this),
|
|
41144
|
+
Enquanto: this.traduzirDeclaracaoEnquanto.bind(this),
|
|
41145
|
+
Continua: () => 'j .continue_label',
|
|
41146
|
+
Escolha: this.traduzirDeclaracaoEscolha.bind(this),
|
|
41147
|
+
Escreva: this.traduzirDeclaracaoEscreva.bind(this),
|
|
41148
|
+
Expressao: this.traduzirDeclaracaoExpressao.bind(this),
|
|
41149
|
+
Fazer: this.traduzirDeclaracaoFazer.bind(this),
|
|
41150
|
+
Falhar: this.traduzirDeclaracaoFalhar.bind(this),
|
|
41151
|
+
FuncaoDeclaracao: this.traduzirDeclaracaoFuncao.bind(this),
|
|
41152
|
+
Importar: this.traduzirDeclaracaoImportar.bind(this),
|
|
41153
|
+
Leia: this.traduzirDeclaracaoLeia.bind(this),
|
|
41154
|
+
Para: this.traduzirDeclaracaoPara.bind(this),
|
|
41155
|
+
ParaCada: this.traduzirDeclaracaoParaCada.bind(this),
|
|
41156
|
+
Retorna: this.traduzirDeclaracaoRetorna.bind(this),
|
|
41157
|
+
Se: this.traduzirDeclaracaoSe.bind(this),
|
|
41158
|
+
Sustar: () => 'j .break_label',
|
|
41159
|
+
Classe: this.traduzirDeclaracaoClasse.bind(this),
|
|
41160
|
+
Tente: this.traduzirDeclaracaoTente.bind(this),
|
|
41161
|
+
Const: this.traduzirDeclaracaoConst.bind(this),
|
|
41162
|
+
Var: this.traduzirDeclaracaoVar.bind(this),
|
|
41163
|
+
};
|
|
41164
|
+
this.indentacao = 0;
|
|
41165
|
+
this.text = `
|
|
41166
|
+
.text
|
|
41167
|
+
.global _start
|
|
41168
|
+
|
|
41169
|
+
_start:`;
|
|
41170
|
+
}
|
|
41171
|
+
gerarDigitoAleatorio() {
|
|
41172
|
+
let result = '';
|
|
41173
|
+
const digits = '0123456789';
|
|
41174
|
+
for (let i = 0; i < 5; i++) {
|
|
41175
|
+
const randomIndex = Math.floor(Math.random() * digits.length);
|
|
41176
|
+
result += digits.charAt(randomIndex);
|
|
41177
|
+
}
|
|
41178
|
+
return result;
|
|
41179
|
+
}
|
|
41180
|
+
gerarLabel() {
|
|
41181
|
+
return `.L${this.contadorLabels++}`;
|
|
41182
|
+
}
|
|
41183
|
+
obterRegistrador() {
|
|
41184
|
+
if (this.registradoresDisponiveis.length > 0) {
|
|
41185
|
+
const reg = this.registradoresDisponiveis.pop();
|
|
41186
|
+
this.pilhaRegistradores.push(reg);
|
|
41187
|
+
return reg;
|
|
41188
|
+
}
|
|
41189
|
+
return 'a0'; // fallback
|
|
41190
|
+
}
|
|
41191
|
+
liberarRegistrador(reg) {
|
|
41192
|
+
const index = this.pilhaRegistradores.indexOf(reg);
|
|
41193
|
+
if (index > -1) {
|
|
41194
|
+
this.pilhaRegistradores.splice(index, 1);
|
|
41195
|
+
this.registradoresDisponiveis.push(reg);
|
|
41196
|
+
}
|
|
41197
|
+
}
|
|
41198
|
+
// Emite a instrução de carga correta para o registrador destino.
|
|
41199
|
+
// RISC-V não tem um `ldr reg, =value` polimórfico como ARM —
|
|
41200
|
+
// usa `li` para inteiros e `la` para endereços de símbolos.
|
|
41201
|
+
emitirCarga(registrador, valor) {
|
|
41202
|
+
if (valor === registrador)
|
|
41203
|
+
return;
|
|
41204
|
+
if (valor === 'null') {
|
|
41205
|
+
this.text += `\n li ${registrador}, 0`;
|
|
41206
|
+
}
|
|
41207
|
+
else if (/^-?\d+$/.test(valor) || valor === 'true' || valor === 'false') {
|
|
41208
|
+
const numVal = valor === 'true' ? '1' : valor === 'false' ? '0' : valor;
|
|
41209
|
+
this.text += `\n li ${registrador}, ${numVal}`;
|
|
41210
|
+
}
|
|
41211
|
+
else if (/^-?\d+\.\d+$/.test(valor)) {
|
|
41212
|
+
// Ponto flutuante: armazenar em .data e carregar endereço.
|
|
41213
|
+
// Operações FPU não são suportadas por esta implementação básica.
|
|
41214
|
+
const floatLabel = `float_${this.gerarDigitoAleatorio()}`;
|
|
41215
|
+
this.data += ` ${floatLabel}: .double ${valor}\n`;
|
|
41216
|
+
this.text += `\n la ${registrador}, ${floatLabel}`;
|
|
41217
|
+
}
|
|
41218
|
+
else {
|
|
41219
|
+
this.text += `\n la ${registrador}, ${valor}`;
|
|
41220
|
+
}
|
|
41221
|
+
}
|
|
41222
|
+
// Implementação dos Construtos
|
|
41223
|
+
traduzirAcessoIndiceVariavel(construto) {
|
|
41224
|
+
var _a;
|
|
41225
|
+
let nomeVar;
|
|
41226
|
+
if (construto.entidadeChamada instanceof construtos_1.Variavel) {
|
|
41227
|
+
nomeVar = (_a = construto.entidadeChamada.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
41228
|
+
}
|
|
41229
|
+
if (!nomeVar)
|
|
41230
|
+
nomeVar = 'unknown';
|
|
41231
|
+
const indice = this.dicionarioConstrutos[construto.indice.constructor.name](construto.indice);
|
|
41232
|
+
const reg = this.obterRegistrador();
|
|
41233
|
+
this.text += `\n la ${reg}, ${nomeVar}`;
|
|
41234
|
+
this.emitirCarga('a0', indice);
|
|
41235
|
+
this.text += `
|
|
41236
|
+
slli a0, a0, 3 # multiplicar índice por 8 (palavra de 64 bits)
|
|
41237
|
+
add ${reg}, ${reg}, a0
|
|
41238
|
+
ld a0, 0(${reg})`;
|
|
41239
|
+
this.liberarRegistrador(reg);
|
|
41240
|
+
return 'a0';
|
|
41241
|
+
}
|
|
41242
|
+
traduzirConstrutoAcessoMetodo(construto) {
|
|
41243
|
+
const objeto = this.dicionarioConstrutos[construto.objeto.constructor.name](construto.objeto);
|
|
41244
|
+
return `${objeto}_${construto.nomeMetodo}`;
|
|
41245
|
+
}
|
|
41246
|
+
traduzirConstrutoAgrupamento(construto) {
|
|
41247
|
+
return this.dicionarioConstrutos[construto.expressao.constructor.name](construto.expressao);
|
|
41248
|
+
}
|
|
41249
|
+
traduzirConstrutoAtribuicaoPorIndice(construto) {
|
|
41250
|
+
var _a;
|
|
41251
|
+
let nomeVar;
|
|
41252
|
+
if (construto.objeto instanceof construtos_1.Variavel) {
|
|
41253
|
+
nomeVar = (_a = construto.objeto.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
41254
|
+
}
|
|
41255
|
+
if (!nomeVar)
|
|
41256
|
+
nomeVar = 'unknown';
|
|
41257
|
+
const indice = this.dicionarioConstrutos[construto.indice.constructor.name](construto.indice);
|
|
41258
|
+
const valor = this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
41259
|
+
const reg = this.obterRegistrador();
|
|
41260
|
+
this.text += `\n la ${reg}, ${nomeVar}`;
|
|
41261
|
+
this.emitirCarga('a1', indice);
|
|
41262
|
+
this.text += `
|
|
41263
|
+
slli a1, a1, 3 # multiplicar índice por 8
|
|
41264
|
+
add ${reg}, ${reg}, a1`;
|
|
41265
|
+
this.emitirCarga('a1', valor);
|
|
41266
|
+
this.text += `\n sd a1, 0(${reg})`;
|
|
41267
|
+
this.liberarRegistrador(reg);
|
|
41268
|
+
}
|
|
41269
|
+
traduzirConstrutoAtribuir(construto) {
|
|
41270
|
+
var _a;
|
|
41271
|
+
let nomeVar;
|
|
41272
|
+
if (construto.alvo instanceof construtos_1.Variavel) {
|
|
41273
|
+
nomeVar = (_a = construto.alvo.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
41274
|
+
}
|
|
41275
|
+
if (!nomeVar)
|
|
41276
|
+
return;
|
|
41277
|
+
const valor = this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
41278
|
+
if (!this.variaveis.has(nomeVar)) {
|
|
41279
|
+
const varLabel = `var_${nomeVar}`;
|
|
41280
|
+
this.bss += ` ${varLabel}: .space 8\n`;
|
|
41281
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
41282
|
+
}
|
|
41283
|
+
this.emitirCarga('a0', valor);
|
|
41284
|
+
this.text += `
|
|
41285
|
+
la a1, ${this.variaveis.get(nomeVar)}
|
|
41286
|
+
sd a0, 0(a1)`;
|
|
41287
|
+
}
|
|
41288
|
+
traduzirConstrutoBinario(construto) {
|
|
41289
|
+
const esquerda = this.dicionarioConstrutos[construto.esquerda.constructor.name](construto.esquerda);
|
|
41290
|
+
const direita = this.dicionarioConstrutos[construto.direita.constructor.name](construto.direita);
|
|
41291
|
+
const operador = construto.operador.lexema;
|
|
41292
|
+
const reg = this.obterRegistrador();
|
|
41293
|
+
// Carregar operando esquerdo em a0
|
|
41294
|
+
if (esquerda !== 'a0') {
|
|
41295
|
+
this.emitirCarga('a0', esquerda);
|
|
41296
|
+
}
|
|
41297
|
+
// Carregar operando direito no registrador scratch
|
|
41298
|
+
this.emitirCarga(reg, direita);
|
|
41299
|
+
switch (operador) {
|
|
41300
|
+
case '+':
|
|
41301
|
+
this.text += `\n add a0, a0, ${reg}`;
|
|
41302
|
+
break;
|
|
41303
|
+
case '-':
|
|
41304
|
+
this.text += `\n sub a0, a0, ${reg}`;
|
|
41305
|
+
break;
|
|
41306
|
+
case '*':
|
|
41307
|
+
this.text += `\n mul a0, a0, ${reg}`;
|
|
41308
|
+
break;
|
|
41309
|
+
case '/':
|
|
41310
|
+
this.text += `\n div a0, a0, ${reg}`;
|
|
41311
|
+
break;
|
|
41312
|
+
case '%':
|
|
41313
|
+
// `rem` é instrução única na extensão M (universal em rv64 Linux)
|
|
41314
|
+
this.text += `\n rem a0, a0, ${reg}`;
|
|
41315
|
+
break;
|
|
41316
|
+
case '<':
|
|
41317
|
+
// slt: a0 = 1 se a0 < reg
|
|
41318
|
+
this.text += `\n slt a0, a0, ${reg}`;
|
|
41319
|
+
break;
|
|
41320
|
+
case '>':
|
|
41321
|
+
// slt com operandos trocados: a0 = 1 se reg < a0, i.e., a0 > reg
|
|
41322
|
+
this.text += `\n slt a0, ${reg}, a0`;
|
|
41323
|
+
break;
|
|
41324
|
+
case '<=':
|
|
41325
|
+
// NOT(a0 > reg) = NOT(reg < a0)
|
|
41326
|
+
this.text += `\n slt a0, ${reg}, a0\n xori a0, a0, 1`;
|
|
41327
|
+
break;
|
|
41328
|
+
case '>=':
|
|
41329
|
+
// NOT(a0 < reg)
|
|
41330
|
+
this.text += `\n slt a0, a0, ${reg}\n xori a0, a0, 1`;
|
|
41331
|
+
break;
|
|
41332
|
+
case '==':
|
|
41333
|
+
case '===':
|
|
41334
|
+
// sub + seqz: a0 = 1 se a0 - reg == 0
|
|
41335
|
+
this.text += `\n sub a0, a0, ${reg}\n seqz a0, a0`;
|
|
41336
|
+
break;
|
|
41337
|
+
case '!=':
|
|
41338
|
+
case '!==':
|
|
41339
|
+
// sub + snez: a0 = 1 se a0 - reg != 0
|
|
41340
|
+
this.text += `\n sub a0, a0, ${reg}\n snez a0, a0`;
|
|
41341
|
+
break;
|
|
41342
|
+
default:
|
|
41343
|
+
this.text += `\n # Operador ${operador} não implementado`;
|
|
41344
|
+
}
|
|
41345
|
+
this.liberarRegistrador(reg);
|
|
41346
|
+
return 'a0';
|
|
41347
|
+
}
|
|
41348
|
+
traduzirConstrutoChamada(construto) {
|
|
41349
|
+
var _a;
|
|
41350
|
+
let nomeFuncao = 'funcao';
|
|
41351
|
+
if (construto.entidadeChamada instanceof construtos_1.Variavel) {
|
|
41352
|
+
nomeFuncao = ((_a = construto.entidadeChamada.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) || 'funcao';
|
|
41353
|
+
}
|
|
41354
|
+
// Convenção RISC-V: a0-a7 para até 8 argumentos
|
|
41355
|
+
const registrosArgs = ['a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7'];
|
|
41356
|
+
construto.argumentos.forEach((arg, index) => {
|
|
41357
|
+
if (index < registrosArgs.length) {
|
|
41358
|
+
const valorArg = this.dicionarioConstrutos[arg.constructor.name](arg);
|
|
41359
|
+
if (valorArg !== registrosArgs[index]) {
|
|
41360
|
+
this.emitirCarga(registrosArgs[index], valorArg);
|
|
41361
|
+
}
|
|
41362
|
+
}
|
|
41363
|
+
});
|
|
41364
|
+
this.text += `\n call ${nomeFuncao}`;
|
|
41365
|
+
}
|
|
41366
|
+
traduzirConstrutoDefinirValor(construto) {
|
|
41367
|
+
const objeto = this.dicionarioConstrutos[construto.objeto.constructor.name](construto.objeto);
|
|
41368
|
+
const valor = this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
41369
|
+
this.emitirCarga('a0', valor);
|
|
41370
|
+
this.text += `
|
|
41371
|
+
la a1, ${objeto}
|
|
41372
|
+
sd a0, 0(a1)`;
|
|
41373
|
+
}
|
|
41374
|
+
traduzirFuncaoConstruto(construto) {
|
|
41375
|
+
const labelFuncao = `func_${this.gerarDigitoAleatorio()}`;
|
|
41376
|
+
this.text += `
|
|
41377
|
+
|
|
41378
|
+
${labelFuncao}:
|
|
41379
|
+
addi sp, sp, -16
|
|
41380
|
+
sd ra, 8(sp)
|
|
41381
|
+
sd s0, 0(sp)
|
|
41382
|
+
addi s0, sp, 16`;
|
|
41383
|
+
if (construto.corpo && Array.isArray(construto.corpo)) {
|
|
41384
|
+
construto.corpo.forEach((declaracao) => {
|
|
41385
|
+
if (this.dicionarioDeclaracoes[declaracao.constructor.name]) {
|
|
41386
|
+
this.dicionarioDeclaracoes[declaracao.constructor.name](declaracao);
|
|
41387
|
+
}
|
|
41388
|
+
});
|
|
41389
|
+
}
|
|
41390
|
+
this.text += `
|
|
41391
|
+
ld ra, 8(sp)
|
|
41392
|
+
ld s0, 0(sp)
|
|
41393
|
+
addi sp, sp, 16
|
|
41394
|
+
ret`;
|
|
41395
|
+
}
|
|
41396
|
+
traduzirConstrutoLiteral(construto) {
|
|
41397
|
+
if (typeof construto.valor === 'string') {
|
|
41398
|
+
return this.criaStringLiteral(construto);
|
|
41399
|
+
}
|
|
41400
|
+
return String(construto.valor);
|
|
41401
|
+
}
|
|
41402
|
+
traduzirConstrutoLogico(construto) {
|
|
41403
|
+
const esquerda = this.dicionarioConstrutos[construto.esquerda.constructor.name](construto.esquerda);
|
|
41404
|
+
const direita = this.dicionarioConstrutos[construto.direita.constructor.name](construto.direita);
|
|
41405
|
+
const operador = construto.operador.lexema;
|
|
41406
|
+
const labelVerdadeiro = this.gerarLabel();
|
|
41407
|
+
const labelFim = this.gerarLabel();
|
|
41408
|
+
this.emitirCarga('a0', esquerda);
|
|
41409
|
+
if (operador === 'e' || operador === '&&') {
|
|
41410
|
+
this.text += `\n beqz a0, ${labelFim}`;
|
|
41411
|
+
this.emitirCarga('a0', direita);
|
|
41412
|
+
this.text += `
|
|
41413
|
+
beqz a0, ${labelFim}
|
|
41414
|
+
${labelVerdadeiro}:
|
|
41415
|
+
li a0, 1
|
|
41416
|
+
${labelFim}:`;
|
|
41417
|
+
}
|
|
41418
|
+
else if (operador === 'ou' || operador === '||') {
|
|
41419
|
+
this.text += `\n bnez a0, ${labelVerdadeiro}`;
|
|
41420
|
+
this.emitirCarga('a0', direita);
|
|
41421
|
+
this.text += `
|
|
41422
|
+
bnez a0, ${labelVerdadeiro}
|
|
41423
|
+
li a0, 0
|
|
41424
|
+
j ${labelFim}
|
|
41425
|
+
${labelVerdadeiro}:
|
|
41426
|
+
li a0, 1
|
|
41427
|
+
${labelFim}:`;
|
|
41428
|
+
}
|
|
41429
|
+
return 'a0';
|
|
41430
|
+
}
|
|
41431
|
+
traduzirConstrutoTipoDe(construto) {
|
|
41432
|
+
return this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
41433
|
+
}
|
|
41434
|
+
traduzirConstrutoUnario(construto) {
|
|
41435
|
+
const operando = this.dicionarioConstrutos[construto.operando.constructor.name](construto.operando);
|
|
41436
|
+
const operador = construto.operador.lexema;
|
|
41437
|
+
this.emitirCarga('a0', operando);
|
|
41438
|
+
if (operador === '-') {
|
|
41439
|
+
this.text += `\n neg a0, a0`;
|
|
41440
|
+
}
|
|
41441
|
+
else if (operador === '!' || operador === 'nao') {
|
|
41442
|
+
// seqz: a0 = 1 se a0 == 0, else 0
|
|
41443
|
+
this.text += `\n seqz a0, a0`;
|
|
41444
|
+
}
|
|
41445
|
+
return 'a0';
|
|
41446
|
+
}
|
|
41447
|
+
traduzirConstrutoVariavel(construto) {
|
|
41448
|
+
var _a;
|
|
41449
|
+
const nomeVar = (_a = construto.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
41450
|
+
if (nomeVar && this.variaveis.has(nomeVar)) {
|
|
41451
|
+
const varLabel = this.variaveis.get(nomeVar);
|
|
41452
|
+
this.text += `
|
|
41453
|
+
la a0, ${varLabel}
|
|
41454
|
+
ld a0, 0(a0)`;
|
|
41455
|
+
return 'a0';
|
|
41456
|
+
}
|
|
41457
|
+
return nomeVar || 'unknown';
|
|
41458
|
+
}
|
|
41459
|
+
traduzirConstrutoVetor(construto) {
|
|
41460
|
+
const labelVetor = `vetor_${this.gerarDigitoAleatorio()}`;
|
|
41461
|
+
// `elementos` filtra nós sintáticos (Separador, ComentarioComoConstruto)
|
|
41462
|
+
const elementos = construto.elementos;
|
|
41463
|
+
// Cada elemento ocupa 8 bytes em rv64
|
|
41464
|
+
this.bss += ` ${labelVetor}: .space ${elementos.length * 8}\n`;
|
|
41465
|
+
elementos.forEach((valor, index) => {
|
|
41466
|
+
if (this.dicionarioConstrutos[valor.constructor.name]) {
|
|
41467
|
+
const valorTraduzido = this.dicionarioConstrutos[valor.constructor.name](valor);
|
|
41468
|
+
this.emitirCarga('a0', valorTraduzido);
|
|
41469
|
+
this.text += `
|
|
41470
|
+
la a1, ${labelVetor}
|
|
41471
|
+
sd a0, ${index * 8}(a1)`;
|
|
41472
|
+
}
|
|
41473
|
+
});
|
|
41474
|
+
return labelVetor;
|
|
41475
|
+
}
|
|
41476
|
+
// Implementação das Declarações
|
|
41477
|
+
traduzirDeclaracaoBloco(declaracao) {
|
|
41478
|
+
if (declaracao.declaracoes && Array.isArray(declaracao.declaracoes)) {
|
|
41479
|
+
declaracao.declaracoes.forEach((decl) => {
|
|
41480
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
41481
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
41482
|
+
}
|
|
41483
|
+
});
|
|
41484
|
+
}
|
|
41485
|
+
}
|
|
41486
|
+
traduzirDeclaracaoEnquanto(declaracao) {
|
|
41487
|
+
const labelInicio = this.gerarLabel();
|
|
41488
|
+
const labelFim = this.gerarLabel();
|
|
41489
|
+
this.text += `\n${labelInicio}:`;
|
|
41490
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicao.constructor.name](declaracao.condicao);
|
|
41491
|
+
if (condicao !== 'a0') {
|
|
41492
|
+
this.emitirCarga('a0', condicao);
|
|
41493
|
+
}
|
|
41494
|
+
this.text += `\n beqz a0, ${labelFim}`;
|
|
41495
|
+
if (this.dicionarioDeclaracoes[declaracao.corpo.constructor.name]) {
|
|
41496
|
+
this.dicionarioDeclaracoes[declaracao.corpo.constructor.name](declaracao.corpo);
|
|
41497
|
+
}
|
|
41498
|
+
this.text += `
|
|
41499
|
+
j ${labelInicio}
|
|
41500
|
+
${labelFim}:`;
|
|
41501
|
+
}
|
|
41502
|
+
traduzirDeclaracaoEscolha(declaracao) {
|
|
41503
|
+
const labelFim = this.gerarLabel();
|
|
41504
|
+
const valorEscolha = this.dicionarioConstrutos[declaracao.identificadorOuLiteral.constructor.name](declaracao.identificadorOuLiteral);
|
|
41505
|
+
if (declaracao.caminhos && Array.isArray(declaracao.caminhos)) {
|
|
41506
|
+
declaracao.caminhos.forEach((caminho) => {
|
|
41507
|
+
const labelProximo = this.gerarLabel();
|
|
41508
|
+
if (caminho.condicoes && caminho.condicoes[0]) {
|
|
41509
|
+
const valorCaso = this.dicionarioConstrutos[caminho.condicoes[0].constructor.name](caminho.condicoes[0]);
|
|
41510
|
+
this.emitirCarga('a0', valorEscolha);
|
|
41511
|
+
this.emitirCarga('a1', valorCaso);
|
|
41512
|
+
this.text += `\n bne a0, a1, ${labelProximo}`;
|
|
41513
|
+
if (caminho.declaracoes && Array.isArray(caminho.declaracoes)) {
|
|
41514
|
+
caminho.declaracoes.forEach((decl) => {
|
|
41515
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
41516
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
41517
|
+
}
|
|
41518
|
+
});
|
|
41519
|
+
}
|
|
41520
|
+
this.text += `
|
|
41521
|
+
j ${labelFim}
|
|
41522
|
+
${labelProximo}:`;
|
|
41523
|
+
}
|
|
41524
|
+
});
|
|
41525
|
+
}
|
|
41526
|
+
this.text += `\n${labelFim}:`;
|
|
41527
|
+
}
|
|
41528
|
+
traduzirDeclaracaoExpressao(declaracao) {
|
|
41529
|
+
if (declaracao.expressao &&
|
|
41530
|
+
this.dicionarioConstrutos[declaracao.expressao.constructor.name]) {
|
|
41531
|
+
this.dicionarioConstrutos[declaracao.expressao.constructor.name](declaracao.expressao);
|
|
41532
|
+
}
|
|
41533
|
+
}
|
|
41534
|
+
traduzirDeclaracaoFazer(declaracao) {
|
|
41535
|
+
const labelInicio = this.gerarLabel();
|
|
41536
|
+
this.text += `\n${labelInicio}:`;
|
|
41537
|
+
if (declaracao.caminhoFazer && declaracao.caminhoFazer.declaracoes) {
|
|
41538
|
+
declaracao.caminhoFazer.declaracoes.forEach((decl) => {
|
|
41539
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
41540
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
41541
|
+
}
|
|
41542
|
+
});
|
|
41543
|
+
}
|
|
41544
|
+
if (declaracao.condicaoEnquanto) {
|
|
41545
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicaoEnquanto.constructor.name](declaracao.condicaoEnquanto);
|
|
41546
|
+
if (condicao !== 'a0') {
|
|
41547
|
+
this.emitirCarga('a0', condicao);
|
|
41548
|
+
}
|
|
41549
|
+
this.text += `\n bnez a0, ${labelInicio}`;
|
|
41550
|
+
}
|
|
41551
|
+
}
|
|
41552
|
+
traduzirDeclaracaoFalhar(declaracao) {
|
|
41553
|
+
let mensagem = '"Erro"';
|
|
41554
|
+
if (declaracao.explicacao &&
|
|
41555
|
+
typeof declaracao.explicacao === 'object' &&
|
|
41556
|
+
'constructor' in declaracao.explicacao) {
|
|
41557
|
+
const explicacao = declaracao.explicacao;
|
|
41558
|
+
if (explicacao.constructor && this.dicionarioConstrutos[explicacao.constructor.name]) {
|
|
41559
|
+
mensagem = this.dicionarioConstrutos[explicacao.constructor.name](explicacao);
|
|
41560
|
+
}
|
|
41561
|
+
}
|
|
41562
|
+
this.text += `
|
|
41563
|
+
# Falhar com mensagem: ${mensagem}
|
|
41564
|
+
li a0, 1
|
|
41565
|
+
li a7, 93 # sys_exit
|
|
41566
|
+
ecall`;
|
|
41567
|
+
}
|
|
41568
|
+
traduzirDeclaracaoFuncao(declaracao) {
|
|
41569
|
+
var _a;
|
|
41570
|
+
const nomeFuncao = ((_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) || 'funcao';
|
|
41571
|
+
this.text += `
|
|
41572
|
+
|
|
41573
|
+
${nomeFuncao}:
|
|
41574
|
+
addi sp, sp, -16
|
|
41575
|
+
sd ra, 8(sp)
|
|
41576
|
+
sd s0, 0(sp)
|
|
41577
|
+
addi s0, sp, 16`;
|
|
41578
|
+
if (declaracao.funcao &&
|
|
41579
|
+
declaracao.funcao.corpo &&
|
|
41580
|
+
Array.isArray(declaracao.funcao.corpo)) {
|
|
41581
|
+
declaracao.funcao.corpo.forEach((decl) => {
|
|
41582
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
41583
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
41584
|
+
}
|
|
41585
|
+
});
|
|
41586
|
+
}
|
|
41587
|
+
this.text += `
|
|
41588
|
+
ld ra, 8(sp)
|
|
41589
|
+
ld s0, 0(sp)
|
|
41590
|
+
addi sp, sp, 16
|
|
41591
|
+
ret`;
|
|
41592
|
+
}
|
|
41593
|
+
traduzirDeclaracaoImportar(declaracao) {
|
|
41594
|
+
this.text += `\n # Importar: ${declaracao.caminho || 'unknown'}`;
|
|
41595
|
+
}
|
|
41596
|
+
traduzirDeclaracaoLeia(declaracao) {
|
|
41597
|
+
var _a;
|
|
41598
|
+
let nomeVar;
|
|
41599
|
+
if (declaracao.argumentos &&
|
|
41600
|
+
declaracao.argumentos[0] &&
|
|
41601
|
+
declaracao.argumentos[0] instanceof construtos_1.Variavel) {
|
|
41602
|
+
nomeVar = (_a = declaracao.argumentos[0].simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
41603
|
+
}
|
|
41604
|
+
if (!nomeVar)
|
|
41605
|
+
return;
|
|
41606
|
+
if (!this.variaveis.has(nomeVar)) {
|
|
41607
|
+
const varLabel = `var_${nomeVar}`;
|
|
41608
|
+
this.bss += ` ${varLabel}: .space 256\n`;
|
|
41609
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
41610
|
+
}
|
|
41611
|
+
this.text += `
|
|
41612
|
+
li a0, 0 # fd stdin
|
|
41613
|
+
la a1, ${this.variaveis.get(nomeVar)}
|
|
41614
|
+
li a2, 256
|
|
41615
|
+
li a7, 63 # sys_read
|
|
41616
|
+
ecall`;
|
|
41617
|
+
}
|
|
41618
|
+
traduzirDeclaracaoPara(declaracao) {
|
|
41619
|
+
const labelInicio = this.gerarLabel();
|
|
41620
|
+
const labelFim = this.gerarLabel();
|
|
41621
|
+
if (declaracao.inicializador) {
|
|
41622
|
+
const tipoInicializador = declaracao.inicializador.constructor.name;
|
|
41623
|
+
if (this.dicionarioDeclaracoes[tipoInicializador]) {
|
|
41624
|
+
this.dicionarioDeclaracoes[tipoInicializador](declaracao.inicializador);
|
|
41625
|
+
}
|
|
41626
|
+
else if (this.dicionarioConstrutos[tipoInicializador]) {
|
|
41627
|
+
this.dicionarioConstrutos[tipoInicializador](declaracao.inicializador);
|
|
41628
|
+
}
|
|
41629
|
+
}
|
|
41630
|
+
this.text += `\n${labelInicio}:`;
|
|
41631
|
+
if (declaracao.condicao) {
|
|
41632
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicao.constructor.name](declaracao.condicao);
|
|
41633
|
+
if (condicao !== 'a0') {
|
|
41634
|
+
this.emitirCarga('a0', condicao);
|
|
41635
|
+
}
|
|
41636
|
+
this.text += `\n beqz a0, ${labelFim}`;
|
|
41637
|
+
}
|
|
41638
|
+
if (this.dicionarioDeclaracoes[declaracao.corpo.constructor.name]) {
|
|
41639
|
+
this.dicionarioDeclaracoes[declaracao.corpo.constructor.name](declaracao.corpo);
|
|
41640
|
+
}
|
|
41641
|
+
if (declaracao.incrementar) {
|
|
41642
|
+
if (this.dicionarioConstrutos[declaracao.incrementar.constructor.name]) {
|
|
41643
|
+
this.dicionarioConstrutos[declaracao.incrementar.constructor.name](declaracao.incrementar);
|
|
41644
|
+
}
|
|
41645
|
+
}
|
|
41646
|
+
this.text += `
|
|
41647
|
+
j ${labelInicio}
|
|
41648
|
+
${labelFim}:`;
|
|
41649
|
+
}
|
|
41650
|
+
traduzirDeclaracaoParaCada(declaracao) {
|
|
41651
|
+
const labelInicio = this.gerarLabel();
|
|
41652
|
+
const labelFim = this.gerarLabel();
|
|
41653
|
+
const vetor = declaracao.vetorOuDicionario;
|
|
41654
|
+
let tamanhoVetor = 0;
|
|
41655
|
+
if (vetor instanceof construtos_1.Vetor) {
|
|
41656
|
+
tamanhoVetor = vetor.tamanho || 0;
|
|
41657
|
+
}
|
|
41658
|
+
// t0: contador; t1: limite (caller-saved, seguros aqui)
|
|
41659
|
+
this.text += `
|
|
41660
|
+
li t0, 0 # contador
|
|
41661
|
+
li t1, ${tamanhoVetor}
|
|
41662
|
+
${labelInicio}:
|
|
41663
|
+
bge t0, t1, ${labelFim}`;
|
|
41664
|
+
if (this.dicionarioDeclaracoes[declaracao.corpo.constructor.name]) {
|
|
41665
|
+
this.dicionarioDeclaracoes[declaracao.corpo.constructor.name](declaracao.corpo);
|
|
41666
|
+
}
|
|
41667
|
+
this.text += `
|
|
41668
|
+
addi t0, t0, 1
|
|
41669
|
+
j ${labelInicio}
|
|
41670
|
+
${labelFim}:`;
|
|
41671
|
+
}
|
|
41672
|
+
traduzirDeclaracaoRetorna(declaracao) {
|
|
41673
|
+
if (declaracao.valor) {
|
|
41674
|
+
const valor = this.dicionarioConstrutos[declaracao.valor.constructor.name](declaracao.valor);
|
|
41675
|
+
this.emitirCarga('a0', valor);
|
|
41676
|
+
}
|
|
41677
|
+
this.text += `
|
|
41678
|
+
ld ra, 8(sp)
|
|
41679
|
+
ld s0, 0(sp)
|
|
41680
|
+
addi sp, sp, 16
|
|
41681
|
+
ret`;
|
|
41682
|
+
}
|
|
41683
|
+
traduzirDeclaracaoSe(declaracao) {
|
|
41684
|
+
const labelSenao = this.gerarLabel();
|
|
41685
|
+
const labelFim = this.gerarLabel();
|
|
41686
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicao.constructor.name](declaracao.condicao);
|
|
41687
|
+
if (condicao !== 'a0') {
|
|
41688
|
+
this.emitirCarga('a0', condicao);
|
|
41689
|
+
}
|
|
41690
|
+
this.text += `\n beqz a0, ${labelSenao}`;
|
|
41691
|
+
if (this.dicionarioDeclaracoes[declaracao.caminhoEntao.constructor.name]) {
|
|
41692
|
+
this.dicionarioDeclaracoes[declaracao.caminhoEntao.constructor.name](declaracao.caminhoEntao);
|
|
41693
|
+
}
|
|
41694
|
+
this.text += `
|
|
41695
|
+
j ${labelFim}
|
|
41696
|
+
${labelSenao}:`;
|
|
41697
|
+
if (declaracao.caminhoSenao &&
|
|
41698
|
+
this.dicionarioDeclaracoes[declaracao.caminhoSenao.constructor.name]) {
|
|
41699
|
+
this.dicionarioDeclaracoes[declaracao.caminhoSenao.constructor.name](declaracao.caminhoSenao);
|
|
41700
|
+
}
|
|
41701
|
+
this.text += `\n${labelFim}:`;
|
|
41702
|
+
}
|
|
41703
|
+
traduzirDeclaracaoClasse(declaracao) {
|
|
41704
|
+
var _a;
|
|
41705
|
+
this.text += `\n # Classe: ${((_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) || 'unknown'}`;
|
|
41706
|
+
}
|
|
41707
|
+
traduzirDeclaracaoTente(declaracao) {
|
|
41708
|
+
this.text += `\n # Tente-pegue`;
|
|
41709
|
+
if (declaracao.caminhoTente && Array.isArray(declaracao.caminhoTente)) {
|
|
41710
|
+
declaracao.caminhoTente.forEach((decl) => {
|
|
41711
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
41712
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
41713
|
+
}
|
|
41714
|
+
});
|
|
41715
|
+
}
|
|
41716
|
+
}
|
|
41717
|
+
traduzirDeclaracaoConst(declaracao) {
|
|
41718
|
+
var _a;
|
|
41719
|
+
const nomeVar = (_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
41720
|
+
if (!nomeVar)
|
|
41721
|
+
return;
|
|
41722
|
+
const valor = this.dicionarioConstrutos[declaracao.inicializador.constructor.name](declaracao.inicializador);
|
|
41723
|
+
const varLabel = `const_${nomeVar}`;
|
|
41724
|
+
this.data += ` ${varLabel}: .dword ${valor}\n`;
|
|
41725
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
41726
|
+
}
|
|
41727
|
+
traduzirDeclaracaoVar(declaracao) {
|
|
41728
|
+
var _a;
|
|
41729
|
+
const nomeVar = (_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
41730
|
+
if (!nomeVar)
|
|
41731
|
+
return;
|
|
41732
|
+
const varLabel = `var_${nomeVar}`;
|
|
41733
|
+
this.bss += ` ${varLabel}: .space 8\n`;
|
|
41734
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
41735
|
+
if (declaracao.inicializador && declaracao.inicializador.valor !== null) {
|
|
41736
|
+
const tipoInicializador = declaracao.inicializador.constructor.name;
|
|
41737
|
+
if (declaracao.inicializador instanceof construtos_1.Vetor) {
|
|
41738
|
+
const labelVetor = this.traduzirConstrutoVetor(declaracao.inicializador);
|
|
41739
|
+
this.variaveis.set(nomeVar, labelVetor);
|
|
41740
|
+
}
|
|
41741
|
+
else if (this.dicionarioConstrutos[tipoInicializador]) {
|
|
41742
|
+
const valor = this.dicionarioConstrutos[tipoInicializador](declaracao.inicializador);
|
|
41743
|
+
this.emitirCarga('a0', valor);
|
|
41744
|
+
this.text += `
|
|
41745
|
+
la a1, ${varLabel}
|
|
41746
|
+
sd a0, 0(a1)`;
|
|
41747
|
+
}
|
|
41748
|
+
}
|
|
41749
|
+
}
|
|
41750
|
+
criaStringLiteral(literal) {
|
|
41751
|
+
const varLiteral = `Delegua_${this.gerarDigitoAleatorio()}`;
|
|
41752
|
+
this.data += ` ${varLiteral}: .asciz "${literal.valor}"\n`;
|
|
41753
|
+
return varLiteral;
|
|
41754
|
+
}
|
|
41755
|
+
criaTamanhoNaMemoriaReferenteAVar(nomeStringLiteral) {
|
|
41756
|
+
return `tam_${nomeStringLiteral}`;
|
|
41757
|
+
}
|
|
41758
|
+
traduzirDeclaracaoEscreva(declaracaoEscreva) {
|
|
41759
|
+
let nomeStringLiteral = '';
|
|
41760
|
+
let tamanhoString = '';
|
|
41761
|
+
if (declaracaoEscreva.argumentos[0] instanceof construtos_1.Literal) {
|
|
41762
|
+
nomeStringLiteral = this.criaStringLiteral(declaracaoEscreva.argumentos[0]);
|
|
41763
|
+
const stringValue = declaracaoEscreva.argumentos[0].valor;
|
|
41764
|
+
tamanhoString = String(stringValue.length);
|
|
41765
|
+
}
|
|
41766
|
+
// sys_write(fd=1, buf, count): a7=64, a0=fd, a1=buf, a2=count
|
|
41767
|
+
this.text += `
|
|
41768
|
+
la a1, ${nomeStringLiteral}
|
|
41769
|
+
li a2, ${tamanhoString}
|
|
41770
|
+
li a0, 1 # fd stdout
|
|
41771
|
+
li a7, 64 # sys_write
|
|
41772
|
+
ecall`;
|
|
41773
|
+
}
|
|
41774
|
+
saidaSistema() {
|
|
41775
|
+
this.text += `
|
|
41776
|
+
li a0, 0 # código de saída
|
|
41777
|
+
li a7, 93 # sys_exit
|
|
41778
|
+
ecall`;
|
|
41779
|
+
}
|
|
41780
|
+
traduzir(declaracoes) {
|
|
41781
|
+
this.declaracoesDeClasses = declaracoes.filter((declaracao) => declaracao instanceof declaracoes_1.Classe);
|
|
41782
|
+
for (const declaracao of declaracoes) {
|
|
41783
|
+
if (this.dicionarioDeclaracoes[declaracao.constructor.name]) {
|
|
41784
|
+
this.dicionarioDeclaracoes[declaracao.constructor.name](declaracao);
|
|
41785
|
+
}
|
|
41786
|
+
}
|
|
41787
|
+
this.saidaSistema();
|
|
41788
|
+
return this.bss + '\n' + this.data + '\n' + this.text;
|
|
41789
|
+
}
|
|
41790
|
+
}
|
|
41791
|
+
exports.TradutorAssemblyRISCV = TradutorAssemblyRISCV;
|
|
41792
|
+
|
|
41793
|
+
},{"../construtos":62,"../declaracoes":110}],241:[function(require,module,exports){
|
|
41794
|
+
"use strict";
|
|
41795
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40911
41796
|
exports.TradutorAssemblyX64 = void 0;
|
|
40912
41797
|
const construtos_1 = require("../construtos");
|
|
40913
41798
|
const declaracoes_1 = require("../declaracoes");
|
|
@@ -41692,7 +42577,7 @@ __delegua_print_int:
|
|
|
41692
42577
|
}
|
|
41693
42578
|
exports.TradutorAssemblyX64 = TradutorAssemblyX64;
|
|
41694
42579
|
|
|
41695
|
-
},{"../construtos":62,"../declaracoes":110}],
|
|
42580
|
+
},{"../construtos":62,"../declaracoes":110}],242:[function(require,module,exports){
|
|
41696
42581
|
"use strict";
|
|
41697
42582
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41698
42583
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -42460,7 +43345,7 @@ class TradutorAssemblyScript {
|
|
|
42460
43345
|
let resultado = '';
|
|
42461
43346
|
this.indentacao += 4;
|
|
42462
43347
|
resultado += ' '.repeat(this.indentacao);
|
|
42463
|
-
for (let condicao of caminho.condicoes) {
|
|
43348
|
+
for (let condicao of caminho.condicoes || []) {
|
|
42464
43349
|
resultado +=
|
|
42465
43350
|
'case ' + this.dicionarioConstrutos[condicao.constructor.name](condicao) + ':\n';
|
|
42466
43351
|
resultado += ' '.repeat(this.indentacao);
|
|
@@ -42836,7 +43721,7 @@ class TradutorAssemblyScript {
|
|
|
42836
43721
|
}
|
|
42837
43722
|
exports.TradutorAssemblyScript = TradutorAssemblyScript;
|
|
42838
43723
|
|
|
42839
|
-
},{"../construtos":62,"../declaracoes":110,"../tipos-de-simbolos/delegua":222}],
|
|
43724
|
+
},{"../construtos":62,"../declaracoes":110,"../tipos-de-simbolos/delegua":222}],243:[function(require,module,exports){
|
|
42840
43725
|
"use strict";
|
|
42841
43726
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42842
43727
|
exports.TradutorCalango = void 0;
|
|
@@ -42891,7 +43776,7 @@ class TradutorCalango {
|
|
|
42891
43776
|
}
|
|
42892
43777
|
exports.TradutorCalango = TradutorCalango;
|
|
42893
43778
|
|
|
42894
|
-
},{}],
|
|
43779
|
+
},{}],244:[function(require,module,exports){
|
|
42895
43780
|
"use strict";
|
|
42896
43781
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42897
43782
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -43820,7 +44705,7 @@ class TradutorElixir {
|
|
|
43820
44705
|
}
|
|
43821
44706
|
exports.TradutorElixir = TradutorElixir;
|
|
43822
44707
|
|
|
43823
|
-
},{"../tipos-de-simbolos/delegua":222}],
|
|
44708
|
+
},{"../tipos-de-simbolos/delegua":222}],245:[function(require,module,exports){
|
|
43824
44709
|
"use strict";
|
|
43825
44710
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
43826
44711
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -44615,7 +45500,7 @@ class TradutorJavaScript {
|
|
|
44615
45500
|
}
|
|
44616
45501
|
exports.TradutorJavaScript = TradutorJavaScript;
|
|
44617
45502
|
|
|
44618
|
-
},{"../construtos":62,"../declaracoes":110,"../tipos-de-simbolos/delegua":222}],
|
|
45503
|
+
},{"../construtos":62,"../declaracoes":110,"../tipos-de-simbolos/delegua":222}],246:[function(require,module,exports){
|
|
44619
45504
|
"use strict";
|
|
44620
45505
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
44621
45506
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -45439,7 +46324,7 @@ class TradutorMermaidJs {
|
|
|
45439
46324
|
}
|
|
45440
46325
|
exports.TradutorMermaidJs = TradutorMermaidJs;
|
|
45441
46326
|
|
|
45442
|
-
},{"../construtos":62,"../declaracoes":110,"../tipos-de-simbolos/delegua":222,"./mermaid":232}],
|
|
46327
|
+
},{"../construtos":62,"../declaracoes":110,"../tipos-de-simbolos/delegua":222,"./mermaid":232}],247:[function(require,module,exports){
|
|
45443
46328
|
"use strict";
|
|
45444
46329
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45445
46330
|
exports.TradutorPortugolIpt = void 0;
|
|
@@ -45501,7 +46386,7 @@ class TradutorPortugolIpt {
|
|
|
45501
46386
|
}
|
|
45502
46387
|
exports.TradutorPortugolIpt = TradutorPortugolIpt;
|
|
45503
46388
|
|
|
45504
|
-
},{"../avaliador-sintatico/dialetos":17,"../lexador/dialetos":192}],
|
|
46389
|
+
},{"../avaliador-sintatico/dialetos":17,"../lexador/dialetos":192}],248:[function(require,module,exports){
|
|
45505
46390
|
"use strict";
|
|
45506
46391
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45507
46392
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -46187,7 +47072,7 @@ class TradutorPython {
|
|
|
46187
47072
|
}
|
|
46188
47073
|
exports.TradutorPython = TradutorPython;
|
|
46189
47074
|
|
|
46190
|
-
},{"../construtos":62,"../declaracoes":110,"../tipos-de-simbolos/delegua":222}],
|
|
47075
|
+
},{"../construtos":62,"../declaracoes":110,"../tipos-de-simbolos/delegua":222}],249:[function(require,module,exports){
|
|
46191
47076
|
"use strict";
|
|
46192
47077
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46193
47078
|
exports.TradutorReversoJavaScript = void 0;
|
|
@@ -46582,7 +47467,7 @@ class TradutorReversoJavaScript {
|
|
|
46582
47467
|
}
|
|
46583
47468
|
exports.TradutorReversoJavaScript = TradutorReversoJavaScript;
|
|
46584
47469
|
|
|
46585
|
-
},{}],
|
|
47470
|
+
},{}],250:[function(require,module,exports){
|
|
46586
47471
|
"use strict";
|
|
46587
47472
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46588
47473
|
exports.TradutorReversoPython = void 0;
|
|
@@ -46655,7 +47540,7 @@ class TradutorReversoPython {
|
|
|
46655
47540
|
}
|
|
46656
47541
|
exports.TradutorReversoPython = TradutorReversoPython;
|
|
46657
47542
|
|
|
46658
|
-
},{"./python/python3-lexer":237,"./python/python3-parser":238,"antlr4ts":
|
|
47543
|
+
},{"./python/python3-lexer":237,"./python/python3-parser":238,"antlr4ts":369,"antlr4ts/tree/ParseTreeWalker":388}],251:[function(require,module,exports){
|
|
46659
47544
|
"use strict";
|
|
46660
47545
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
46661
47546
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -47249,7 +48134,7 @@ class TradutorReversoTenda {
|
|
|
47249
48134
|
}
|
|
47250
48135
|
exports.TradutorReversoTenda = TradutorReversoTenda;
|
|
47251
48136
|
|
|
47252
|
-
},{"../construtos":62,"../tipos-de-simbolos/tenda":229}],
|
|
48137
|
+
},{"../construtos":62,"../tipos-de-simbolos/tenda":229}],252:[function(require,module,exports){
|
|
47253
48138
|
"use strict";
|
|
47254
48139
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47255
48140
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -47937,7 +48822,909 @@ class TradutorRuby {
|
|
|
47937
48822
|
}
|
|
47938
48823
|
exports.TradutorRuby = TradutorRuby;
|
|
47939
48824
|
|
|
47940
|
-
},{"../construtos":62,"../declaracoes":110,"../tipos-de-simbolos/delegua":222}],
|
|
48825
|
+
},{"../construtos":62,"../declaracoes":110,"../tipos-de-simbolos/delegua":222}],253:[function(require,module,exports){
|
|
48826
|
+
"use strict";
|
|
48827
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48828
|
+
exports.TradutorWebAssembly = void 0;
|
|
48829
|
+
const construtos_1 = require("../construtos");
|
|
48830
|
+
const declaracoes_1 = require("../declaracoes");
|
|
48831
|
+
class TradutorWebAssembly {
|
|
48832
|
+
constructor() {
|
|
48833
|
+
// ── Seções do módulo WAT ───────────────────────────────────────────────
|
|
48834
|
+
/** Segmentos de dados estáticos para strings literais */
|
|
48835
|
+
this.segmentosTexto = [];
|
|
48836
|
+
/** Próximo byte livre na memória linear para strings */
|
|
48837
|
+
this.deslocamentoTexto = 0;
|
|
48838
|
+
/** Texto WAT completo de cada função declarada pelo usuário */
|
|
48839
|
+
this.funcoesCompletas = [];
|
|
48840
|
+
/** Declarações WAT de variáveis globais `(global ...)` */
|
|
48841
|
+
this.declaracoesGlobais = [];
|
|
48842
|
+
// ── Contexto da função sendo traduzida no momento ──────────────────────
|
|
48843
|
+
/** Instruções WAT emitidas no corpo da função corrente */
|
|
48844
|
+
this.corpoDaFuncaoAtual = '';
|
|
48845
|
+
/** Declarações `(param ...)` e `(local ...)` da função corrente */
|
|
48846
|
+
this.declaracoesLocaisAtual = '';
|
|
48847
|
+
/** Nomes de locais/params já declarados (evita duplicatas) */
|
|
48848
|
+
this.locaisDeclaradosAtual = new Set();
|
|
48849
|
+
/** Estamos dentro do corpo de uma função nomeada? */
|
|
48850
|
+
this.dentroFuncao = false;
|
|
48851
|
+
/** A função corrente possui ao menos um `retorna` com valor? */
|
|
48852
|
+
this.funcaoTemRetorno = false;
|
|
48853
|
+
// ── Mapa de variáveis ─────────────────────────────────────────────────
|
|
48854
|
+
/** Nome Delégua → metadados WAT */
|
|
48855
|
+
this.variaveis = new Map();
|
|
48856
|
+
// ── Controle de fluxo (break/continue) ───────────────────────────────
|
|
48857
|
+
/** Pilha de rótulos de laço para `sustar`/`continua` */
|
|
48858
|
+
this.pilhaDeControle = [];
|
|
48859
|
+
// ── Geração de rótulos ────────────────────────────────────────────────
|
|
48860
|
+
this.contadorRotulos = 0;
|
|
48861
|
+
// =========================================================================
|
|
48862
|
+
// Dicionário de construtos (expressões)
|
|
48863
|
+
// =========================================================================
|
|
48864
|
+
this.dicionarioConstrutos = {
|
|
48865
|
+
AcessoIndiceVariavel: this.traduzirAcessoIndiceVariavel.bind(this),
|
|
48866
|
+
AcessoMetodoOuPropriedade: this.traduzirAcessoMetodo.bind(this),
|
|
48867
|
+
Agrupamento: this.traduzirAgrupamento.bind(this),
|
|
48868
|
+
AtribuicaoPorIndice: this.traduzirAtribuicaoPorIndice.bind(this),
|
|
48869
|
+
Atribuir: this.traduzirAtribuir.bind(this),
|
|
48870
|
+
Binario: this.traduzirBinario.bind(this),
|
|
48871
|
+
Chamada: this.traduzirChamada.bind(this),
|
|
48872
|
+
DefinirValor: this.traduzirDefinirValor.bind(this),
|
|
48873
|
+
FuncaoConstruto: this.traduzirFuncaoConstruto.bind(this),
|
|
48874
|
+
Literal: this.traduzirLiteral.bind(this),
|
|
48875
|
+
Logico: this.traduzirLogico.bind(this),
|
|
48876
|
+
TipoDe: this.traduzirTipoDe.bind(this),
|
|
48877
|
+
Unario: this.traduzirUnario.bind(this),
|
|
48878
|
+
Variavel: this.traduzirVariavel.bind(this),
|
|
48879
|
+
Vetor: this.traduzirVetor.bind(this),
|
|
48880
|
+
};
|
|
48881
|
+
// =========================================================================
|
|
48882
|
+
// Dicionário de declarações (instruções)
|
|
48883
|
+
// =========================================================================
|
|
48884
|
+
this.dicionarioDeclaracoes = {
|
|
48885
|
+
Bloco: this.traduzirBloco.bind(this),
|
|
48886
|
+
Classe: this.traduzirClasse.bind(this),
|
|
48887
|
+
Const: this.traduzirConst.bind(this),
|
|
48888
|
+
Continua: this.traduzirContinua.bind(this),
|
|
48889
|
+
Enquanto: this.traduzirEnquanto.bind(this),
|
|
48890
|
+
Escolha: this.traduzirEscolha.bind(this),
|
|
48891
|
+
Escreva: this.traduzirEscreva.bind(this),
|
|
48892
|
+
EscrevaMesmaLinha: this.traduzirEscreva.bind(this),
|
|
48893
|
+
Expressao: this.traduzirExpressao.bind(this),
|
|
48894
|
+
Falhar: this.traduzirFalhar.bind(this),
|
|
48895
|
+
Fazer: this.traduzirFazer.bind(this),
|
|
48896
|
+
FuncaoDeclaracao: this.traduzirFuncaoDeclaracao.bind(this),
|
|
48897
|
+
Importar: this.traduzirImportar.bind(this),
|
|
48898
|
+
Para: this.traduzirPara.bind(this),
|
|
48899
|
+
ParaCada: this.traduzirParaCada.bind(this),
|
|
48900
|
+
Retorna: this.traduzirRetorna.bind(this),
|
|
48901
|
+
Se: this.traduzirSe.bind(this),
|
|
48902
|
+
Sustar: this.traduzirSustar.bind(this),
|
|
48903
|
+
Tente: this.traduzirTente.bind(this),
|
|
48904
|
+
Var: this.traduzirVar.bind(this),
|
|
48905
|
+
};
|
|
48906
|
+
}
|
|
48907
|
+
// =========================================================================
|
|
48908
|
+
// Helpers internos
|
|
48909
|
+
// =========================================================================
|
|
48910
|
+
gerarRotulo() {
|
|
48911
|
+
return `$L${this.contadorRotulos++}`;
|
|
48912
|
+
}
|
|
48913
|
+
/** Emite uma instrução indentada no corpo da função corrente. */
|
|
48914
|
+
emitir(instrucao) {
|
|
48915
|
+
this.corpoDaFuncaoAtual += ` ${instrucao}\n`;
|
|
48916
|
+
}
|
|
48917
|
+
/**
|
|
48918
|
+
* Converte uma string JavaScript para bytes UTF-8.
|
|
48919
|
+
* Usa `encodeURIComponent` para extrair os bytes — funciona em qualquer ambiente JS
|
|
48920
|
+
* sem depender de APIs específicas de Node.js (Buffer) ou browser (TextEncoder).
|
|
48921
|
+
*/
|
|
48922
|
+
stringParaBytesUtf8(valor) {
|
|
48923
|
+
const encoded = encodeURIComponent(valor);
|
|
48924
|
+
const bytes = [];
|
|
48925
|
+
for (let i = 0; i < encoded.length;) {
|
|
48926
|
+
if (encoded[i] === '%') {
|
|
48927
|
+
bytes.push(parseInt(encoded.slice(i + 1, i + 3), 16));
|
|
48928
|
+
i += 3;
|
|
48929
|
+
}
|
|
48930
|
+
else {
|
|
48931
|
+
bytes.push(encoded.charCodeAt(i));
|
|
48932
|
+
i++;
|
|
48933
|
+
}
|
|
48934
|
+
}
|
|
48935
|
+
return bytes;
|
|
48936
|
+
}
|
|
48937
|
+
/**
|
|
48938
|
+
* Converte uma string JavaScript para o formato de literal de string WAT.
|
|
48939
|
+
* Bytes não-ASCII e caracteres especiais são hex-escapados como `\xx`.
|
|
48940
|
+
* Retorna o literal pronto para uso em `(data ...)` e o comprimento em bytes UTF-8.
|
|
48941
|
+
*/
|
|
48942
|
+
escaparStringWat(valor) {
|
|
48943
|
+
const bytes = this.stringParaBytesUtf8(valor);
|
|
48944
|
+
let watLiteral = '';
|
|
48945
|
+
for (const byte of bytes) {
|
|
48946
|
+
if (byte === 0x22) {
|
|
48947
|
+
watLiteral += '\\"'; // aspas duplas
|
|
48948
|
+
}
|
|
48949
|
+
else if (byte === 0x5c) {
|
|
48950
|
+
watLiteral += '\\\\'; // contrabarra
|
|
48951
|
+
}
|
|
48952
|
+
else if (byte >= 0x20 && byte <= 0x7e) {
|
|
48953
|
+
watLiteral += String.fromCharCode(byte); // ASCII imprimível
|
|
48954
|
+
}
|
|
48955
|
+
else {
|
|
48956
|
+
watLiteral += `\\${byte.toString(16).padStart(2, '0')}`; // \xx
|
|
48957
|
+
}
|
|
48958
|
+
}
|
|
48959
|
+
return { watLiteral, byteLen: bytes.length };
|
|
48960
|
+
}
|
|
48961
|
+
/**
|
|
48962
|
+
* Internaliza uma string literal na memória linear estática.
|
|
48963
|
+
* Strings idênticas são deduplicadas.
|
|
48964
|
+
* O comprimento armazenado é o comprimento em bytes UTF-8, não em caracteres.
|
|
48965
|
+
*/
|
|
48966
|
+
internalizarTexto(valor) {
|
|
48967
|
+
const existente = this.segmentosTexto.find((s) => s.conteudo === valor);
|
|
48968
|
+
if (existente) {
|
|
48969
|
+
return { offset: existente.deslocamento, len: existente.tamanho };
|
|
48970
|
+
}
|
|
48971
|
+
const { byteLen } = this.escaparStringWat(valor);
|
|
48972
|
+
const offset = this.deslocamentoTexto;
|
|
48973
|
+
this.segmentosTexto.push({ deslocamento: offset, conteudo: valor, tamanho: byteLen });
|
|
48974
|
+
this.deslocamentoTexto += byteLen;
|
|
48975
|
+
return { offset, len: byteLen };
|
|
48976
|
+
}
|
|
48977
|
+
/**
|
|
48978
|
+
* Infere o tipo WAT de um construto.
|
|
48979
|
+
* Strings → i32 (ponteiro). Tudo mais → i64 (padrão, inclusive booleanos).
|
|
48980
|
+
*/
|
|
48981
|
+
inferirTipo(construto) {
|
|
48982
|
+
if (construto instanceof construtos_1.Literal && typeof construto.valor === 'string')
|
|
48983
|
+
return 'i32';
|
|
48984
|
+
return 'i64';
|
|
48985
|
+
}
|
|
48986
|
+
/**
|
|
48987
|
+
* Declara um parâmetro ou variável local para a função corrente.
|
|
48988
|
+
* `ehParam = true` emite `(param ...)`, senão `(local ...)`.
|
|
48989
|
+
*/
|
|
48990
|
+
declararParamLocal(nome, tipo, ehParam) {
|
|
48991
|
+
if (this.locaisDeclaradosAtual.has(nome))
|
|
48992
|
+
return;
|
|
48993
|
+
this.locaisDeclaradosAtual.add(nome);
|
|
48994
|
+
const watNome = `$${nome}`;
|
|
48995
|
+
const diretiva = ehParam ? 'param' : 'local';
|
|
48996
|
+
this.declaracoesLocaisAtual += ` (${diretiva} ${watNome} ${tipo})`;
|
|
48997
|
+
this.variaveis.set(nome, { watNome, tipo, escopo: 'local' });
|
|
48998
|
+
}
|
|
48999
|
+
/** Salva o contexto da função corrente e inicializa um novo. */
|
|
49000
|
+
salvarEIniciarContextoFuncao() {
|
|
49001
|
+
const snapshot = {
|
|
49002
|
+
corpoDaFuncaoAtual: this.corpoDaFuncaoAtual,
|
|
49003
|
+
declaracoesLocaisAtual: this.declaracoesLocaisAtual,
|
|
49004
|
+
locaisDeclaradosAtual: this.locaisDeclaradosAtual,
|
|
49005
|
+
dentroFuncao: this.dentroFuncao,
|
|
49006
|
+
funcaoTemRetorno: this.funcaoTemRetorno,
|
|
49007
|
+
variaveis: new Map(this.variaveis),
|
|
49008
|
+
};
|
|
49009
|
+
this.corpoDaFuncaoAtual = '';
|
|
49010
|
+
this.declaracoesLocaisAtual = '';
|
|
49011
|
+
this.locaisDeclaradosAtual = new Set();
|
|
49012
|
+
this.dentroFuncao = true;
|
|
49013
|
+
this.funcaoTemRetorno = false;
|
|
49014
|
+
// Remove locais do mapa — globais permanecem
|
|
49015
|
+
for (const [nome, meta] of this.variaveis) {
|
|
49016
|
+
if (meta.escopo === 'local')
|
|
49017
|
+
this.variaveis.delete(nome);
|
|
49018
|
+
}
|
|
49019
|
+
return snapshot;
|
|
49020
|
+
}
|
|
49021
|
+
/** Restaura o contexto de função a partir de um snapshot. */
|
|
49022
|
+
restaurarContextoFuncao(snapshot) {
|
|
49023
|
+
this.corpoDaFuncaoAtual = snapshot.corpoDaFuncaoAtual;
|
|
49024
|
+
this.declaracoesLocaisAtual = snapshot.declaracoesLocaisAtual;
|
|
49025
|
+
this.locaisDeclaradosAtual = snapshot.locaisDeclaradosAtual;
|
|
49026
|
+
this.dentroFuncao = snapshot.dentroFuncao;
|
|
49027
|
+
this.funcaoTemRetorno = snapshot.funcaoTemRetorno;
|
|
49028
|
+
this.variaveis = snapshot.variaveis;
|
|
49029
|
+
}
|
|
49030
|
+
/**
|
|
49031
|
+
* Garante que uma variável existe no escopo correto.
|
|
49032
|
+
* Retorna o nome WAT da variável (e.g. `$x`).
|
|
49033
|
+
*/
|
|
49034
|
+
garantirVariavel(nome, tipo = 'i64') {
|
|
49035
|
+
if (this.variaveis.has(nome)) {
|
|
49036
|
+
return this.variaveis.get(nome).watNome;
|
|
49037
|
+
}
|
|
49038
|
+
if (this.dentroFuncao) {
|
|
49039
|
+
this.declararParamLocal(nome, tipo, false);
|
|
49040
|
+
return `$${nome}`;
|
|
49041
|
+
}
|
|
49042
|
+
// Global
|
|
49043
|
+
const watNome = `$${nome}`;
|
|
49044
|
+
this.declaracoesGlobais.push(` (global ${watNome} (mut ${tipo}) (${tipo}.const 0))`);
|
|
49045
|
+
this.variaveis.set(nome, { watNome, tipo, escopo: 'global' });
|
|
49046
|
+
return watNome;
|
|
49047
|
+
}
|
|
49048
|
+
// =========================================================================
|
|
49049
|
+
// Dispatch helpers
|
|
49050
|
+
// =========================================================================
|
|
49051
|
+
traduzirConstruto(construto) {
|
|
49052
|
+
const handler = this.dicionarioConstrutos[construto.constructor.name];
|
|
49053
|
+
if (handler)
|
|
49054
|
+
return handler(construto);
|
|
49055
|
+
return `(i64.const 0) ;; construto não suportado: ${construto.constructor.name}`;
|
|
49056
|
+
}
|
|
49057
|
+
traduzirDeclaracaoInterna(declaracao) {
|
|
49058
|
+
const handler = this.dicionarioDeclaracoes[declaracao.constructor.name];
|
|
49059
|
+
if (handler)
|
|
49060
|
+
handler(declaracao);
|
|
49061
|
+
else
|
|
49062
|
+
this.emitir(`;; declaração não suportada: ${declaracao.constructor.name}`);
|
|
49063
|
+
}
|
|
49064
|
+
// =========================================================================
|
|
49065
|
+
// Construtos
|
|
49066
|
+
// =========================================================================
|
|
49067
|
+
traduzirLiteral(construto) {
|
|
49068
|
+
if (typeof construto.valor === 'boolean') {
|
|
49069
|
+
return `(i64.const ${construto.valor ? 1 : 0})`;
|
|
49070
|
+
}
|
|
49071
|
+
if (typeof construto.valor === 'string') {
|
|
49072
|
+
// Retorna apenas o ponteiro; `escreva` usa internalizarTexto diretamente
|
|
49073
|
+
// para obter o comprimento também.
|
|
49074
|
+
const { offset } = this.internalizarTexto(construto.valor);
|
|
49075
|
+
return `(i32.const ${offset})`;
|
|
49076
|
+
}
|
|
49077
|
+
if (typeof construto.valor === 'bigint') {
|
|
49078
|
+
return `(i64.const ${construto.valor})`;
|
|
49079
|
+
}
|
|
49080
|
+
// Número: trunca para i64
|
|
49081
|
+
return `(i64.const ${Math.trunc(Number(construto.valor))})`;
|
|
49082
|
+
}
|
|
49083
|
+
traduzirVariavel(construto) {
|
|
49084
|
+
var _a;
|
|
49085
|
+
const nome = (_a = construto.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
49086
|
+
if (!nome)
|
|
49087
|
+
return '(i64.const 0)';
|
|
49088
|
+
const meta = this.variaveis.get(nome);
|
|
49089
|
+
if (!meta)
|
|
49090
|
+
return `(i64.const 0) ;; variável desconhecida: ${nome}`;
|
|
49091
|
+
const instrucao = meta.escopo === 'local' ? 'local.get' : 'global.get';
|
|
49092
|
+
return `(${instrucao} ${meta.watNome})`;
|
|
49093
|
+
}
|
|
49094
|
+
traduzirAtribuir(construto) {
|
|
49095
|
+
var _a;
|
|
49096
|
+
let nome;
|
|
49097
|
+
if (construto.alvo instanceof construtos_1.Variavel) {
|
|
49098
|
+
nome = (_a = construto.alvo.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
49099
|
+
}
|
|
49100
|
+
if (!nome)
|
|
49101
|
+
return '(i64.const 0)';
|
|
49102
|
+
const tipoInferido = this.inferirTipo(construto.valor);
|
|
49103
|
+
const watNome = this.garantirVariavel(nome, tipoInferido);
|
|
49104
|
+
const valor = this.traduzirConstruto(construto.valor);
|
|
49105
|
+
const meta = this.variaveis.get(nome);
|
|
49106
|
+
const instrucao = meta.escopo === 'local' ? 'local.set' : 'global.set';
|
|
49107
|
+
return `(${instrucao} ${watNome} ${valor})`;
|
|
49108
|
+
}
|
|
49109
|
+
traduzirBinario(construto) {
|
|
49110
|
+
const esq = this.traduzirConstruto(construto.esquerda);
|
|
49111
|
+
const dir = this.traduzirConstruto(construto.direita);
|
|
49112
|
+
const op = construto.operador.lexema;
|
|
49113
|
+
switch (op) {
|
|
49114
|
+
case '+':
|
|
49115
|
+
return `(i64.add ${esq} ${dir})`;
|
|
49116
|
+
case '-':
|
|
49117
|
+
return `(i64.sub ${esq} ${dir})`;
|
|
49118
|
+
case '*':
|
|
49119
|
+
return `(i64.mul ${esq} ${dir})`;
|
|
49120
|
+
case '/':
|
|
49121
|
+
return `(i64.div_s ${esq} ${dir})`;
|
|
49122
|
+
case '%':
|
|
49123
|
+
return `(i64.rem_s ${esq} ${dir})`;
|
|
49124
|
+
case '<':
|
|
49125
|
+
return `(i64.extend_i32_s (i64.lt_s ${esq} ${dir}))`;
|
|
49126
|
+
case '>':
|
|
49127
|
+
return `(i64.extend_i32_s (i64.gt_s ${esq} ${dir}))`;
|
|
49128
|
+
case '<=':
|
|
49129
|
+
return `(i64.extend_i32_s (i64.le_s ${esq} ${dir}))`;
|
|
49130
|
+
case '>=':
|
|
49131
|
+
return `(i64.extend_i32_s (i64.ge_s ${esq} ${dir}))`;
|
|
49132
|
+
case '==':
|
|
49133
|
+
case '===':
|
|
49134
|
+
return `(i64.extend_i32_s (i64.eq ${esq} ${dir}))`;
|
|
49135
|
+
case '!=':
|
|
49136
|
+
case '!==':
|
|
49137
|
+
return `(i64.extend_i32_s (i64.ne ${esq} ${dir}))`;
|
|
49138
|
+
default:
|
|
49139
|
+
return `(i64.const 0) ;; operador não suportado: ${op}`;
|
|
49140
|
+
}
|
|
49141
|
+
}
|
|
49142
|
+
traduzirLogico(construto) {
|
|
49143
|
+
const esq = this.traduzirConstruto(construto.esquerda);
|
|
49144
|
+
const dir = this.traduzirConstruto(construto.direita);
|
|
49145
|
+
const op = construto.operador.lexema;
|
|
49146
|
+
// Ambos os lados avaliados (sem curto-circuito na v1).
|
|
49147
|
+
// Converte i64 → i32 (ne 0), aplica i32.and / i32.or, estende de volta.
|
|
49148
|
+
const esqBool = `(i32.ne (i32.const 0) (i32.wrap_i64 ${esq}))`;
|
|
49149
|
+
const dirBool = `(i32.ne (i32.const 0) (i32.wrap_i64 ${dir}))`;
|
|
49150
|
+
if (op === 'e' || op === '&&') {
|
|
49151
|
+
return `(i64.extend_i32_s (i32.and ${esqBool} ${dirBool}))`;
|
|
49152
|
+
}
|
|
49153
|
+
if (op === 'ou' || op === '||') {
|
|
49154
|
+
return `(i64.extend_i32_s (i32.or ${esqBool} ${dirBool}))`;
|
|
49155
|
+
}
|
|
49156
|
+
return `(i64.const 0) ;; operador lógico não suportado: ${op}`;
|
|
49157
|
+
}
|
|
49158
|
+
traduzirUnario(construto) {
|
|
49159
|
+
var _a;
|
|
49160
|
+
const op = construto.operador.lexema;
|
|
49161
|
+
const operando = this.traduzirConstruto(construto.operando);
|
|
49162
|
+
if (op === '-') {
|
|
49163
|
+
return `(i64.sub (i64.const 0) ${operando})`;
|
|
49164
|
+
}
|
|
49165
|
+
if (op === '!' || op === 'nao') {
|
|
49166
|
+
return `(i64.extend_i32_s (i64.eqz ${operando}))`;
|
|
49167
|
+
}
|
|
49168
|
+
if (op === '++' || op === '--') {
|
|
49169
|
+
// Apenas pré-incremento/decremento de variável simples na v1
|
|
49170
|
+
let nome;
|
|
49171
|
+
if (construto.operando instanceof construtos_1.Variavel) {
|
|
49172
|
+
nome = (_a = construto.operando.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
49173
|
+
}
|
|
49174
|
+
if (!nome)
|
|
49175
|
+
return operando;
|
|
49176
|
+
const meta = this.variaveis.get(nome);
|
|
49177
|
+
if (!meta)
|
|
49178
|
+
return operando;
|
|
49179
|
+
const instrSet = meta.escopo === 'local' ? 'local.set' : 'global.set';
|
|
49180
|
+
const instrGet = meta.escopo === 'local' ? 'local.get' : 'global.get';
|
|
49181
|
+
const delta = op === '++' ? 1 : -1;
|
|
49182
|
+
const novoValor = `(i64.add ${operando} (i64.const ${delta}))`;
|
|
49183
|
+
// Retorna uma sequência: set + get (usando local.tee para locais, ou set;get para globais)
|
|
49184
|
+
if (meta.escopo === 'local') {
|
|
49185
|
+
return `(local.tee ${meta.watNome} ${novoValor})`;
|
|
49186
|
+
}
|
|
49187
|
+
// Para globais não existe tee; emitimos o set e retornamos o get
|
|
49188
|
+
this.emitir(`(${instrSet} ${meta.watNome} ${novoValor})`);
|
|
49189
|
+
return `(${instrGet} ${meta.watNome})`;
|
|
49190
|
+
}
|
|
49191
|
+
return operando;
|
|
49192
|
+
}
|
|
49193
|
+
traduzirAgrupamento(construto) {
|
|
49194
|
+
return this.traduzirConstruto(construto.expressao);
|
|
49195
|
+
}
|
|
49196
|
+
traduzirChamada(construto) {
|
|
49197
|
+
var _a;
|
|
49198
|
+
let nomeFuncao = 'desconhecida';
|
|
49199
|
+
if (construto.entidadeChamada instanceof construtos_1.Variavel) {
|
|
49200
|
+
nomeFuncao = ((_a = construto.entidadeChamada.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) || 'desconhecida';
|
|
49201
|
+
}
|
|
49202
|
+
const args = construto.argumentos
|
|
49203
|
+
.map((arg) => this.traduzirConstruto(arg))
|
|
49204
|
+
.join(' ');
|
|
49205
|
+
return `(call $${nomeFuncao}${args ? ' ' + args : ''})`;
|
|
49206
|
+
}
|
|
49207
|
+
traduzirAcessoIndiceVariavel(construto) {
|
|
49208
|
+
var _a;
|
|
49209
|
+
let baseExpr = '(i32.const 0)';
|
|
49210
|
+
if (construto.entidadeChamada instanceof construtos_1.Variavel) {
|
|
49211
|
+
const nome = (_a = construto.entidadeChamada.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
49212
|
+
const meta = nome ? this.variaveis.get(nome) : undefined;
|
|
49213
|
+
if (meta) {
|
|
49214
|
+
const instrGet = meta.escopo === 'local' ? 'local.get' : 'global.get';
|
|
49215
|
+
baseExpr = `(${instrGet} ${meta.watNome})`;
|
|
49216
|
+
}
|
|
49217
|
+
}
|
|
49218
|
+
const indice = this.traduzirConstruto(construto.indice);
|
|
49219
|
+
// base + indice * 8 (cada elemento i64 ocupa 8 bytes)
|
|
49220
|
+
const offset = `(i32.add ${baseExpr} (i32.wrap_i64 (i64.mul ${indice} (i64.const 8))))`;
|
|
49221
|
+
return `(i64.load ${offset})`;
|
|
49222
|
+
}
|
|
49223
|
+
traduzirAtribuicaoPorIndice(construto) {
|
|
49224
|
+
var _a;
|
|
49225
|
+
let baseExpr = '(i32.const 0)';
|
|
49226
|
+
if (construto.objeto instanceof construtos_1.Variavel) {
|
|
49227
|
+
const nome = (_a = construto.objeto.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
49228
|
+
const meta = nome ? this.variaveis.get(nome) : undefined;
|
|
49229
|
+
if (meta) {
|
|
49230
|
+
const instrGet = meta.escopo === 'local' ? 'local.get' : 'global.get';
|
|
49231
|
+
baseExpr = `(${instrGet} ${meta.watNome})`;
|
|
49232
|
+
}
|
|
49233
|
+
}
|
|
49234
|
+
const indice = this.traduzirConstruto(construto.indice);
|
|
49235
|
+
const valor = this.traduzirConstruto(construto.valor);
|
|
49236
|
+
const offset = `(i32.add ${baseExpr} (i32.wrap_i64 (i64.mul ${indice} (i64.const 8))))`;
|
|
49237
|
+
return `(i64.store ${offset} ${valor})`;
|
|
49238
|
+
}
|
|
49239
|
+
traduzirVetor(construto) {
|
|
49240
|
+
var _a, _b;
|
|
49241
|
+
// Aloca espaço na memória linear para N × 8 bytes.
|
|
49242
|
+
// Os valores são emitidos como instruções de store na função corrente.
|
|
49243
|
+
const n = (_b = (_a = construto.valores) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
49244
|
+
const offset = this.deslocamentoTexto;
|
|
49245
|
+
// Reserva n * 8 bytes (sem conteúdo estático; preenchido em tempo de execução)
|
|
49246
|
+
this.deslocamentoTexto += n * 8;
|
|
49247
|
+
if (construto.valores) {
|
|
49248
|
+
for (let i = 0; i < n; i++) {
|
|
49249
|
+
const valor = this.traduzirConstruto(construto.valores[i]);
|
|
49250
|
+
const enderecoElem = `(i32.const ${offset + i * 8})`;
|
|
49251
|
+
this.emitir(`(i64.store ${enderecoElem} ${valor})`);
|
|
49252
|
+
}
|
|
49253
|
+
}
|
|
49254
|
+
return `(i32.const ${offset})`;
|
|
49255
|
+
}
|
|
49256
|
+
traduzirDefinirValor(construto) {
|
|
49257
|
+
// Acesso a propriedade de objeto — simplificado na v1
|
|
49258
|
+
const valor = this.traduzirConstruto(construto.valor);
|
|
49259
|
+
return `${valor} ;; definir valor não totalmente suportado na v1`;
|
|
49260
|
+
}
|
|
49261
|
+
traduzirFuncaoConstruto(construto) {
|
|
49262
|
+
var _a;
|
|
49263
|
+
// Função anônima: emite como função nomeada com rótulo gerado
|
|
49264
|
+
const rotulo = `__anonima_${this.contadorRotulos++}`;
|
|
49265
|
+
const snapshot = this.salvarEIniciarContextoFuncao();
|
|
49266
|
+
for (const decl of (_a = construto.corpo) !== null && _a !== void 0 ? _a : []) {
|
|
49267
|
+
this.traduzirDeclaracaoInterna(decl);
|
|
49268
|
+
}
|
|
49269
|
+
this.emitir('(i64.const 0)');
|
|
49270
|
+
const funcWat = ` (func $${rotulo}${this.declaracoesLocaisAtual} (result i64)\n` +
|
|
49271
|
+
this.corpoDaFuncaoAtual +
|
|
49272
|
+
` )`;
|
|
49273
|
+
this.funcoesCompletas.push(funcWat);
|
|
49274
|
+
this.restaurarContextoFuncao(snapshot);
|
|
49275
|
+
return `(i32.const 0) ;; referência à função anônima $${rotulo}`;
|
|
49276
|
+
}
|
|
49277
|
+
traduzirAcessoMetodo(_construto) {
|
|
49278
|
+
return '(i64.const 0) ;; acesso a método não suportado na v1';
|
|
49279
|
+
}
|
|
49280
|
+
traduzirTipoDe(construto) {
|
|
49281
|
+
return this.traduzirConstruto(construto.valor);
|
|
49282
|
+
}
|
|
49283
|
+
// =========================================================================
|
|
49284
|
+
// Declarações
|
|
49285
|
+
// =========================================================================
|
|
49286
|
+
traduzirVar(declaracao) {
|
|
49287
|
+
var _a;
|
|
49288
|
+
const nome = (_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
49289
|
+
if (!nome)
|
|
49290
|
+
return;
|
|
49291
|
+
if (declaracao.inicializador instanceof construtos_1.Vetor) {
|
|
49292
|
+
// Vetor: aloca em memória e guarda o ponteiro i32 na variável
|
|
49293
|
+
if (this.dentroFuncao) {
|
|
49294
|
+
this.declararParamLocal(nome, 'i32', false);
|
|
49295
|
+
}
|
|
49296
|
+
else {
|
|
49297
|
+
this.declaracoesGlobais.push(` (global $${nome} (mut i32) (i32.const 0))`);
|
|
49298
|
+
this.variaveis.set(nome, { watNome: `$${nome}`, tipo: 'i32', escopo: 'global' });
|
|
49299
|
+
}
|
|
49300
|
+
const ponteiro = this.traduzirVetor(declaracao.inicializador);
|
|
49301
|
+
const meta = this.variaveis.get(nome);
|
|
49302
|
+
const instrSet = meta.escopo === 'local' ? 'local.set' : 'global.set';
|
|
49303
|
+
this.emitir(`(${instrSet} $${nome} ${ponteiro})`);
|
|
49304
|
+
return;
|
|
49305
|
+
}
|
|
49306
|
+
const tipo = declaracao.inicializador ? this.inferirTipo(declaracao.inicializador) : 'i64';
|
|
49307
|
+
if (this.dentroFuncao) {
|
|
49308
|
+
this.declararParamLocal(nome, tipo, false);
|
|
49309
|
+
if (declaracao.inicializador) {
|
|
49310
|
+
const valor = this.traduzirConstruto(declaracao.inicializador);
|
|
49311
|
+
this.emitir(`(local.set $${nome} ${valor})`);
|
|
49312
|
+
}
|
|
49313
|
+
}
|
|
49314
|
+
else {
|
|
49315
|
+
// Globais WAT só aceitam const-exprs como inicializadores.
|
|
49316
|
+
// Literais → inicializador imediato; expressões complexas → init 0 + global.set em $principal.
|
|
49317
|
+
if (declaracao.inicializador instanceof construtos_1.Literal) {
|
|
49318
|
+
const init = this.traduzirGlobalInit(declaracao.inicializador, tipo);
|
|
49319
|
+
this.declaracoesGlobais.push(` (global $${nome} (mut ${tipo}) ${init})`);
|
|
49320
|
+
this.variaveis.set(nome, { watNome: `$${nome}`, tipo, escopo: 'global' });
|
|
49321
|
+
}
|
|
49322
|
+
else {
|
|
49323
|
+
this.declaracoesGlobais.push(` (global $${nome} (mut ${tipo}) (${tipo}.const 0))`);
|
|
49324
|
+
this.variaveis.set(nome, { watNome: `$${nome}`, tipo, escopo: 'global' });
|
|
49325
|
+
if (declaracao.inicializador) {
|
|
49326
|
+
const valor = this.traduzirConstruto(declaracao.inicializador);
|
|
49327
|
+
this.emitir(`(global.set $${nome} ${valor})`);
|
|
49328
|
+
}
|
|
49329
|
+
}
|
|
49330
|
+
}
|
|
49331
|
+
}
|
|
49332
|
+
traduzirConst(declaracao) {
|
|
49333
|
+
var _a;
|
|
49334
|
+
const nome = (_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
49335
|
+
if (!nome)
|
|
49336
|
+
return;
|
|
49337
|
+
const tipo = this.inferirTipo(declaracao.inicializador);
|
|
49338
|
+
if (this.dentroFuncao) {
|
|
49339
|
+
// Dentro de função: trata como local (sem imutabilidade real em WAT)
|
|
49340
|
+
this.declararParamLocal(nome, tipo, false);
|
|
49341
|
+
const valor = this.traduzirConstruto(declaracao.inicializador);
|
|
49342
|
+
this.emitir(`(local.set $${nome} ${valor})`);
|
|
49343
|
+
}
|
|
49344
|
+
else {
|
|
49345
|
+
// Constante global: sem `mut`; apenas literais são válidos como init
|
|
49346
|
+
if (declaracao.inicializador instanceof construtos_1.Literal) {
|
|
49347
|
+
const init = this.traduzirGlobalInit(declaracao.inicializador, tipo);
|
|
49348
|
+
this.declaracoesGlobais.push(` (global $${nome} ${tipo} ${init})`);
|
|
49349
|
+
}
|
|
49350
|
+
else {
|
|
49351
|
+
// Expressão complexa: global imutável não pode ser sobrescrita em WAT.
|
|
49352
|
+
// Tratamos como mutável para permitir inicialização tardia.
|
|
49353
|
+
this.declaracoesGlobais.push(` (global $${nome} (mut ${tipo}) (${tipo}.const 0))`);
|
|
49354
|
+
const valor = this.traduzirConstruto(declaracao.inicializador);
|
|
49355
|
+
this.emitir(`(global.set $${nome} ${valor})`);
|
|
49356
|
+
}
|
|
49357
|
+
this.variaveis.set(nome, { watNome: `$${nome}`, tipo, escopo: 'global' });
|
|
49358
|
+
}
|
|
49359
|
+
}
|
|
49360
|
+
/**
|
|
49361
|
+
* Traduz um literal para um WAT const-expr válido como inicializador de global.
|
|
49362
|
+
* Apenas literais são aceitos como inicializadores de globais em WAT.
|
|
49363
|
+
*/
|
|
49364
|
+
traduzirGlobalInit(construto, tipo) {
|
|
49365
|
+
if (typeof construto.valor === 'boolean')
|
|
49366
|
+
return `(i64.const ${construto.valor ? 1 : 0})`;
|
|
49367
|
+
if (typeof construto.valor === 'string') {
|
|
49368
|
+
const { offset } = this.internalizarTexto(construto.valor);
|
|
49369
|
+
return `(i32.const ${offset})`;
|
|
49370
|
+
}
|
|
49371
|
+
if (typeof construto.valor === 'bigint')
|
|
49372
|
+
return `(i64.const ${construto.valor})`;
|
|
49373
|
+
return `(${tipo}.const ${Math.trunc(Number(construto.valor))})`;
|
|
49374
|
+
}
|
|
49375
|
+
traduzirSe(declaracao) {
|
|
49376
|
+
const condicao = this.traduzirConstruto(declaracao.condicao);
|
|
49377
|
+
this.emitir(`(if`);
|
|
49378
|
+
this.emitir(` (i32.wrap_i64 ${condicao})`);
|
|
49379
|
+
this.emitir(` (then`);
|
|
49380
|
+
if (this.dicionarioDeclaracoes[declaracao.caminhoEntao.constructor.name]) {
|
|
49381
|
+
const corpoPrevio = this.corpoDaFuncaoAtual;
|
|
49382
|
+
this.corpoDaFuncaoAtual = '';
|
|
49383
|
+
this.traduzirDeclaracaoInterna(declaracao.caminhoEntao);
|
|
49384
|
+
const corpoEntao = this.corpoDaFuncaoAtual
|
|
49385
|
+
.split('\n')
|
|
49386
|
+
.map((l) => ` ${l}`)
|
|
49387
|
+
.join('\n');
|
|
49388
|
+
this.corpoDaFuncaoAtual = corpoPrevio + corpoEntao;
|
|
49389
|
+
}
|
|
49390
|
+
this.emitir(` )`);
|
|
49391
|
+
if (declaracao.caminhoSenao) {
|
|
49392
|
+
this.emitir(` (else`);
|
|
49393
|
+
const corpoPrevio = this.corpoDaFuncaoAtual;
|
|
49394
|
+
this.corpoDaFuncaoAtual = '';
|
|
49395
|
+
this.traduzirDeclaracaoInterna(declaracao.caminhoSenao);
|
|
49396
|
+
const corpoSenao = this.corpoDaFuncaoAtual
|
|
49397
|
+
.split('\n')
|
|
49398
|
+
.map((l) => ` ${l}`)
|
|
49399
|
+
.join('\n');
|
|
49400
|
+
this.corpoDaFuncaoAtual = corpoPrevio + corpoSenao;
|
|
49401
|
+
this.emitir(` )`);
|
|
49402
|
+
}
|
|
49403
|
+
this.emitir(`)`);
|
|
49404
|
+
}
|
|
49405
|
+
traduzirEnquanto(declaracao) {
|
|
49406
|
+
const labelSaida = this.gerarRotulo();
|
|
49407
|
+
const labelLaco = this.gerarRotulo();
|
|
49408
|
+
this.pilhaDeControle.push({ labelSaida, labelLaco });
|
|
49409
|
+
const condicao = this.traduzirConstruto(declaracao.condicao);
|
|
49410
|
+
this.emitir(`(block ${labelSaida}`);
|
|
49411
|
+
this.emitir(` (loop ${labelLaco}`);
|
|
49412
|
+
this.emitir(` (br_if ${labelSaida}`);
|
|
49413
|
+
this.emitir(` (i32.eqz (i32.wrap_i64 ${condicao}))`);
|
|
49414
|
+
this.emitir(` )`);
|
|
49415
|
+
this.traduzirDeclaracaoInterna(declaracao.corpo);
|
|
49416
|
+
this.emitir(` (br ${labelLaco})`);
|
|
49417
|
+
this.emitir(` )`);
|
|
49418
|
+
this.emitir(`)`);
|
|
49419
|
+
this.pilhaDeControle.pop();
|
|
49420
|
+
}
|
|
49421
|
+
traduzirPara(declaracao) {
|
|
49422
|
+
// Inicializador
|
|
49423
|
+
if (declaracao.inicializador) {
|
|
49424
|
+
if (Array.isArray(declaracao.inicializador)) {
|
|
49425
|
+
for (const decl of declaracao.inicializador) {
|
|
49426
|
+
this.traduzirDeclaracaoInterna(decl);
|
|
49427
|
+
}
|
|
49428
|
+
}
|
|
49429
|
+
else {
|
|
49430
|
+
this.traduzirDeclaracaoInterna(declaracao.inicializador);
|
|
49431
|
+
}
|
|
49432
|
+
}
|
|
49433
|
+
const labelSaida = this.gerarRotulo();
|
|
49434
|
+
const labelLaco = this.gerarRotulo();
|
|
49435
|
+
this.pilhaDeControle.push({ labelSaida, labelLaco });
|
|
49436
|
+
const condicao = declaracao.condicao
|
|
49437
|
+
? this.traduzirConstruto(declaracao.condicao)
|
|
49438
|
+
: '(i64.const 1)';
|
|
49439
|
+
this.emitir(`(block ${labelSaida}`);
|
|
49440
|
+
this.emitir(` (loop ${labelLaco}`);
|
|
49441
|
+
this.emitir(` (br_if ${labelSaida}`);
|
|
49442
|
+
this.emitir(` (i32.eqz (i32.wrap_i64 ${condicao}))`);
|
|
49443
|
+
this.emitir(` )`);
|
|
49444
|
+
if (declaracao.corpo) {
|
|
49445
|
+
this.traduzirDeclaracaoInterna(declaracao.corpo);
|
|
49446
|
+
}
|
|
49447
|
+
if (declaracao.incrementar) {
|
|
49448
|
+
const inc = this.traduzirConstruto(declaracao.incrementar);
|
|
49449
|
+
this.emitir(`(drop ${inc})`);
|
|
49450
|
+
}
|
|
49451
|
+
this.emitir(` (br ${labelLaco})`);
|
|
49452
|
+
this.emitir(` )`);
|
|
49453
|
+
this.emitir(`)`);
|
|
49454
|
+
this.pilhaDeControle.pop();
|
|
49455
|
+
}
|
|
49456
|
+
traduzirFazer(declaracao) {
|
|
49457
|
+
var _a;
|
|
49458
|
+
const labelSaida = this.gerarRotulo();
|
|
49459
|
+
const labelLaco = this.gerarRotulo();
|
|
49460
|
+
this.pilhaDeControle.push({ labelSaida, labelLaco });
|
|
49461
|
+
this.emitir(`(block ${labelSaida}`);
|
|
49462
|
+
this.emitir(` (loop ${labelLaco}`);
|
|
49463
|
+
if ((_a = declaracao.caminhoFazer) === null || _a === void 0 ? void 0 : _a.declaracoes) {
|
|
49464
|
+
for (const decl of declaracao.caminhoFazer.declaracoes) {
|
|
49465
|
+
this.traduzirDeclaracaoInterna(decl);
|
|
49466
|
+
}
|
|
49467
|
+
}
|
|
49468
|
+
if (declaracao.condicaoEnquanto) {
|
|
49469
|
+
const condicao = this.traduzirConstruto(declaracao.condicaoEnquanto);
|
|
49470
|
+
// Repete se a condição for verdadeira
|
|
49471
|
+
this.emitir(` (br_if ${labelLaco}`);
|
|
49472
|
+
this.emitir(` (i32.wrap_i64 ${condicao})`);
|
|
49473
|
+
this.emitir(` )`);
|
|
49474
|
+
}
|
|
49475
|
+
this.emitir(` )`);
|
|
49476
|
+
this.emitir(`)`);
|
|
49477
|
+
this.pilhaDeControle.pop();
|
|
49478
|
+
}
|
|
49479
|
+
traduzirEscolha(declaracao) {
|
|
49480
|
+
const rotuloEscolha = `__escolha_${this.contadorRotulos++}`;
|
|
49481
|
+
const tipo = 'i64';
|
|
49482
|
+
// Declara local temporário para o valor do escolha
|
|
49483
|
+
this.declararParamLocal(rotuloEscolha, tipo, false);
|
|
49484
|
+
const sujeito = this.traduzirConstruto(declaracao.identificadorOuLiteral);
|
|
49485
|
+
this.emitir(`(local.set $${rotuloEscolha} ${sujeito})`);
|
|
49486
|
+
// Gera cadeia de if/else aninhados
|
|
49487
|
+
this.emitirCadeiaEscolha(rotuloEscolha, declaracao.caminhos, declaracao.caminhoPadrao);
|
|
49488
|
+
}
|
|
49489
|
+
emitirCadeiaEscolha(rotuloEscolha, caminhos, caminhoPadrao, indice = 0) {
|
|
49490
|
+
var _a, _b;
|
|
49491
|
+
if (indice >= caminhos.length) {
|
|
49492
|
+
// Emite o caminho padrão (senao) se existir
|
|
49493
|
+
if (caminhoPadrao) {
|
|
49494
|
+
for (const decl of (_a = caminhoPadrao.declaracoes) !== null && _a !== void 0 ? _a : []) {
|
|
49495
|
+
this.traduzirDeclaracaoInterna(decl);
|
|
49496
|
+
}
|
|
49497
|
+
}
|
|
49498
|
+
return;
|
|
49499
|
+
}
|
|
49500
|
+
const caminho = caminhos[indice];
|
|
49501
|
+
if (!caminho.condicoes || caminho.condicoes.length === 0) {
|
|
49502
|
+
this.emitirCadeiaEscolha(rotuloEscolha, caminhos, caminhoPadrao, indice + 1);
|
|
49503
|
+
return;
|
|
49504
|
+
}
|
|
49505
|
+
// Condição: qualquer das condicoes casa com o valor do escolha
|
|
49506
|
+
const primeiraCond = `(i64.eq (local.get $${rotuloEscolha}) ${this.traduzirConstruto(caminho.condicoes[0])})`;
|
|
49507
|
+
let condicaoFinal = primeiraCond;
|
|
49508
|
+
for (let i = 1; i < caminho.condicoes.length; i++) {
|
|
49509
|
+
const outraCond = `(i64.eq (local.get $${rotuloEscolha}) ${this.traduzirConstruto(caminho.condicoes[i])})`;
|
|
49510
|
+
condicaoFinal = `(i32.or ${condicaoFinal} ${outraCond})`;
|
|
49511
|
+
}
|
|
49512
|
+
this.emitir(`(if`);
|
|
49513
|
+
this.emitir(` ${condicaoFinal}`);
|
|
49514
|
+
this.emitir(` (then`);
|
|
49515
|
+
for (const decl of (_b = caminho.declaracoes) !== null && _b !== void 0 ? _b : []) {
|
|
49516
|
+
this.traduzirDeclaracaoInterna(decl);
|
|
49517
|
+
}
|
|
49518
|
+
this.emitir(` )`);
|
|
49519
|
+
const temProximo = indice + 1 < caminhos.length || caminhoPadrao != null;
|
|
49520
|
+
if (temProximo) {
|
|
49521
|
+
this.emitir(` (else`);
|
|
49522
|
+
this.emitirCadeiaEscolha(rotuloEscolha, caminhos, caminhoPadrao, indice + 1);
|
|
49523
|
+
this.emitir(` )`);
|
|
49524
|
+
}
|
|
49525
|
+
this.emitir(`)`);
|
|
49526
|
+
}
|
|
49527
|
+
traduzirBloco(declaracao) {
|
|
49528
|
+
var _a;
|
|
49529
|
+
for (const decl of (_a = declaracao.declaracoes) !== null && _a !== void 0 ? _a : []) {
|
|
49530
|
+
this.traduzirDeclaracaoInterna(decl);
|
|
49531
|
+
}
|
|
49532
|
+
}
|
|
49533
|
+
traduzirExpressao(declaracao) {
|
|
49534
|
+
if (!declaracao.expressao)
|
|
49535
|
+
return;
|
|
49536
|
+
const expr = this.traduzirConstruto(declaracao.expressao);
|
|
49537
|
+
// Atribuições e stores não deixam valor na pilha; outros sim → drop
|
|
49538
|
+
const deixaValor = !(declaracao.expressao instanceof construtos_1.Atribuir) &&
|
|
49539
|
+
!(declaracao.expressao instanceof construtos_1.AtribuicaoPorIndice);
|
|
49540
|
+
if (deixaValor) {
|
|
49541
|
+
this.emitir(`(drop ${expr})`);
|
|
49542
|
+
}
|
|
49543
|
+
else {
|
|
49544
|
+
this.emitir(expr);
|
|
49545
|
+
}
|
|
49546
|
+
}
|
|
49547
|
+
traduzirEscreva(declaracao) {
|
|
49548
|
+
for (const arg of declaracao.argumentos) {
|
|
49549
|
+
if (arg instanceof construtos_1.Literal && typeof arg.valor === 'string') {
|
|
49550
|
+
const { offset, len } = this.internalizarTexto(arg.valor);
|
|
49551
|
+
this.emitir(`(call $__escreva_texto (i32.const ${offset}) (i32.const ${len}))`);
|
|
49552
|
+
}
|
|
49553
|
+
else {
|
|
49554
|
+
const expr = this.traduzirConstruto(arg);
|
|
49555
|
+
this.emitir(`(call $__escreva_inteiro ${expr})`);
|
|
49556
|
+
}
|
|
49557
|
+
}
|
|
49558
|
+
}
|
|
49559
|
+
traduzirRetorna(declaracao) {
|
|
49560
|
+
this.funcaoTemRetorno = true;
|
|
49561
|
+
if (declaracao.valor) {
|
|
49562
|
+
const valor = this.traduzirConstruto(declaracao.valor);
|
|
49563
|
+
this.emitir(`(return ${valor})`);
|
|
49564
|
+
}
|
|
49565
|
+
else {
|
|
49566
|
+
this.emitir(`(return (i64.const 0))`);
|
|
49567
|
+
}
|
|
49568
|
+
}
|
|
49569
|
+
traduzirSustar(_declaracao) {
|
|
49570
|
+
const topo = this.pilhaDeControle[this.pilhaDeControle.length - 1];
|
|
49571
|
+
if (topo) {
|
|
49572
|
+
this.emitir(`(br ${topo.labelSaida})`);
|
|
49573
|
+
}
|
|
49574
|
+
}
|
|
49575
|
+
traduzirContinua(_declaracao) {
|
|
49576
|
+
const topo = this.pilhaDeControle[this.pilhaDeControle.length - 1];
|
|
49577
|
+
if (topo) {
|
|
49578
|
+
this.emitir(`(br ${topo.labelLaco})`);
|
|
49579
|
+
}
|
|
49580
|
+
}
|
|
49581
|
+
traduzirFuncaoDeclaracao(declaracao) {
|
|
49582
|
+
var _a, _b, _c, _d, _e, _f;
|
|
49583
|
+
const nome = (_b = (_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) !== null && _b !== void 0 ? _b : `__func_${this.contadorRotulos++}`;
|
|
49584
|
+
const snapshot = this.salvarEIniciarContextoFuncao();
|
|
49585
|
+
// Declara parâmetros
|
|
49586
|
+
for (const param of (_d = (_c = declaracao.funcao) === null || _c === void 0 ? void 0 : _c.parametros) !== null && _d !== void 0 ? _d : []) {
|
|
49587
|
+
this.declararParamLocal(param.nome.lexema, 'i64', true);
|
|
49588
|
+
}
|
|
49589
|
+
// Traduz corpo
|
|
49590
|
+
for (const decl of (_f = (_e = declaracao.funcao) === null || _e === void 0 ? void 0 : _e.corpo) !== null && _f !== void 0 ? _f : []) {
|
|
49591
|
+
this.traduzirDeclaracaoInterna(decl);
|
|
49592
|
+
}
|
|
49593
|
+
// Retorno implícito 0 (garante stack completo)
|
|
49594
|
+
this.emitir('(i64.const 0)');
|
|
49595
|
+
const ehPrincipal = nome === 'principal';
|
|
49596
|
+
const exportar = ehPrincipal ? ' (export "principal")' : '';
|
|
49597
|
+
const funcWat = ` (func $${nome}${exportar}${this.declaracoesLocaisAtual} (result i64)\n` +
|
|
49598
|
+
this.corpoDaFuncaoAtual +
|
|
49599
|
+
` )`;
|
|
49600
|
+
this.funcoesCompletas.push(funcWat);
|
|
49601
|
+
this.restaurarContextoFuncao(snapshot);
|
|
49602
|
+
}
|
|
49603
|
+
traduzirFalhar(declaracao) {
|
|
49604
|
+
// `unreachable` = trap incondicional em WebAssembly
|
|
49605
|
+
let msg = '';
|
|
49606
|
+
if (declaracao.explicacao) {
|
|
49607
|
+
try {
|
|
49608
|
+
msg = ` ;; ${this.traduzirConstruto(declaracao.explicacao)}`;
|
|
49609
|
+
}
|
|
49610
|
+
catch (_a) {
|
|
49611
|
+
// ignore
|
|
49612
|
+
}
|
|
49613
|
+
}
|
|
49614
|
+
this.emitir(`(unreachable)${msg}`);
|
|
49615
|
+
}
|
|
49616
|
+
traduzirImportar(_declaracao) {
|
|
49617
|
+
this.emitir(`;; importar não suportado em WebAssembly nativo`);
|
|
49618
|
+
}
|
|
49619
|
+
traduzirTente(declaracao) {
|
|
49620
|
+
var _a;
|
|
49621
|
+
this.emitir(`;; tente/pegue: tratamento de exceções é v2`);
|
|
49622
|
+
for (const decl of (_a = declaracao.caminhoTente) !== null && _a !== void 0 ? _a : []) {
|
|
49623
|
+
this.traduzirDeclaracaoInterna(decl);
|
|
49624
|
+
}
|
|
49625
|
+
}
|
|
49626
|
+
traduzirClasse(_declaracao) {
|
|
49627
|
+
this.emitir(`;; classe: não suportada na v1`);
|
|
49628
|
+
}
|
|
49629
|
+
traduzirParaCada(declaracao) {
|
|
49630
|
+
this.emitir(`;; para cada: requer suporte a iteráveis (v2)`);
|
|
49631
|
+
if (declaracao.corpo) {
|
|
49632
|
+
this.traduzirDeclaracaoInterna(declaracao.corpo);
|
|
49633
|
+
}
|
|
49634
|
+
}
|
|
49635
|
+
// =========================================================================
|
|
49636
|
+
// Método principal
|
|
49637
|
+
// =========================================================================
|
|
49638
|
+
/**
|
|
49639
|
+
* Traduz uma lista de declarações Delégua para um módulo WAT.
|
|
49640
|
+
* Retorna a string completa do módulo.
|
|
49641
|
+
*/
|
|
49642
|
+
traduzir(declaracoes) {
|
|
49643
|
+
// Verifica se o usuário declarou explicitamente `funcao principal()`
|
|
49644
|
+
const principalDeclarado = declaracoes.some((d) => { var _a; return d instanceof declaracoes_1.FuncaoDeclaracao && ((_a = d.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) === 'principal'; });
|
|
49645
|
+
// Processa todas as declarações de nível superior
|
|
49646
|
+
for (const declaracao of declaracoes) {
|
|
49647
|
+
this.traduzirDeclaracaoInterna(declaracao);
|
|
49648
|
+
}
|
|
49649
|
+
// Se o usuário não declarou principal(), envolve os stmts de topo em $principal
|
|
49650
|
+
if (!principalDeclarado) {
|
|
49651
|
+
const corpoTopo = this.corpoDaFuncaoAtual;
|
|
49652
|
+
const locaisDeclarados = this.declaracoesLocaisAtual;
|
|
49653
|
+
const funcPrincipal = ` (func $principal (export "principal")${locaisDeclarados} (result i64)\n` +
|
|
49654
|
+
corpoTopo +
|
|
49655
|
+
` (i64.const 0)\n` +
|
|
49656
|
+
` )`;
|
|
49657
|
+
this.funcoesCompletas.push(funcPrincipal);
|
|
49658
|
+
}
|
|
49659
|
+
// ── Monta as seções do módulo ────────────────────────────────────────
|
|
49660
|
+
const linhasImports = [
|
|
49661
|
+
` (import "delegua" "escreva_texto" (func $__escreva_texto (param i32 i32)))`,
|
|
49662
|
+
` (import "delegua" "escreva_inteiro" (func $__escreva_inteiro (param i64)))`,
|
|
49663
|
+
];
|
|
49664
|
+
const linhaMemoria = ` (memory (export "memory") 1)`;
|
|
49665
|
+
const linhasDados = this.segmentosTexto.map((s) => {
|
|
49666
|
+
const { watLiteral } = this.escaparStringWat(s.conteudo);
|
|
49667
|
+
return ` (data (i32.const ${s.deslocamento}) "${watLiteral}")`;
|
|
49668
|
+
});
|
|
49669
|
+
const partes = ['(module', ...linhasImports, '', linhaMemoria];
|
|
49670
|
+
if (linhasDados.length > 0) {
|
|
49671
|
+
partes.push('');
|
|
49672
|
+
partes.push(...linhasDados);
|
|
49673
|
+
}
|
|
49674
|
+
if (this.declaracoesGlobais.length > 0) {
|
|
49675
|
+
partes.push('');
|
|
49676
|
+
partes.push(...this.declaracoesGlobais);
|
|
49677
|
+
}
|
|
49678
|
+
if (this.funcoesCompletas.length > 0) {
|
|
49679
|
+
partes.push('');
|
|
49680
|
+
partes.push(...this.funcoesCompletas);
|
|
49681
|
+
}
|
|
49682
|
+
partes.push(')');
|
|
49683
|
+
return partes.join('\n');
|
|
49684
|
+
}
|
|
49685
|
+
// =========================================================================
|
|
49686
|
+
// Arquivo host JavaScript
|
|
49687
|
+
// =========================================================================
|
|
49688
|
+
/**
|
|
49689
|
+
* Gera um arquivo `.mjs` host para executar o módulo WASM no Node.js.
|
|
49690
|
+
* Fornece os imports necessários (`delegua.escreva_texto`, `delegua.escreva_inteiro`).
|
|
49691
|
+
*/
|
|
49692
|
+
gerarArquivoHost() {
|
|
49693
|
+
return `// Gerado por Delégua -> WebAssembly
|
|
49694
|
+
// Uso: node delegua-host.mjs <arquivo.wasm>
|
|
49695
|
+
import { readFileSync } from 'fs';
|
|
49696
|
+
|
|
49697
|
+
const args = process.argv.slice(2);
|
|
49698
|
+
const wasmPath = args[0] ?? 'saida.wasm';
|
|
49699
|
+
|
|
49700
|
+
let memoryExport;
|
|
49701
|
+
|
|
49702
|
+
const importObject = {
|
|
49703
|
+
delegua: {
|
|
49704
|
+
/** Imprime texto a partir de um ponteiro e comprimento na memória linear. */
|
|
49705
|
+
escreva_texto(ptr, len) {
|
|
49706
|
+
const bytes = new Uint8Array(memoryExport.buffer, ptr, len);
|
|
49707
|
+
process.stdout.write(new TextDecoder('utf-8').decode(bytes));
|
|
49708
|
+
},
|
|
49709
|
+
/** Imprime um inteiro de 64 bits (recebido como BigInt no JS). */
|
|
49710
|
+
escreva_inteiro(valor) {
|
|
49711
|
+
process.stdout.write(String(valor));
|
|
49712
|
+
},
|
|
49713
|
+
}
|
|
49714
|
+
};
|
|
49715
|
+
|
|
49716
|
+
const wasmBuffer = readFileSync(wasmPath);
|
|
49717
|
+
const { instance } = await WebAssembly.instantiate(wasmBuffer, importObject);
|
|
49718
|
+
memoryExport = instance.exports.memory;
|
|
49719
|
+
|
|
49720
|
+
const codigoSaida = Number(instance.exports.principal());
|
|
49721
|
+
process.exit(codigoSaida);
|
|
49722
|
+
`;
|
|
49723
|
+
}
|
|
49724
|
+
}
|
|
49725
|
+
exports.TradutorWebAssembly = TradutorWebAssembly;
|
|
49726
|
+
|
|
49727
|
+
},{"../construtos":62,"../declaracoes":110}],254:[function(require,module,exports){
|
|
47941
49728
|
"use strict";
|
|
47942
49729
|
/*!
|
|
47943
49730
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47945,7 +49732,7 @@ exports.TradutorRuby = TradutorRuby;
|
|
|
47945
49732
|
*/
|
|
47946
49733
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47947
49734
|
|
|
47948
|
-
},{}],
|
|
49735
|
+
},{}],255:[function(require,module,exports){
|
|
47949
49736
|
"use strict";
|
|
47950
49737
|
/*!
|
|
47951
49738
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47953,7 +49740,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
47953
49740
|
*/
|
|
47954
49741
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47955
49742
|
|
|
47956
|
-
},{}],
|
|
49743
|
+
},{}],256:[function(require,module,exports){
|
|
47957
49744
|
"use strict";
|
|
47958
49745
|
/*!
|
|
47959
49746
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48115,7 +49902,7 @@ __decorate([
|
|
|
48115
49902
|
], ANTLRInputStream.prototype, "toString", null);
|
|
48116
49903
|
exports.ANTLRInputStream = ANTLRInputStream;
|
|
48117
49904
|
|
|
48118
|
-
},{"./Decorators":
|
|
49905
|
+
},{"./Decorators":267,"./IntStream":273,"assert":410}],257:[function(require,module,exports){
|
|
48119
49906
|
"use strict";
|
|
48120
49907
|
/*!
|
|
48121
49908
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48198,7 +49985,7 @@ __decorate([
|
|
|
48198
49985
|
], BailErrorStrategy.prototype, "sync", null);
|
|
48199
49986
|
exports.BailErrorStrategy = BailErrorStrategy;
|
|
48200
49987
|
|
|
48201
|
-
},{"./Decorators":
|
|
49988
|
+
},{"./Decorators":267,"./DefaultErrorStrategy":268,"./InputMismatchException":272,"./misc/ParseCancellationException":384}],258:[function(require,module,exports){
|
|
48202
49989
|
"use strict";
|
|
48203
49990
|
/*!
|
|
48204
49991
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48688,7 +50475,7 @@ BufferedTokenStream = __decorate([
|
|
|
48688
50475
|
], BufferedTokenStream);
|
|
48689
50476
|
exports.BufferedTokenStream = BufferedTokenStream;
|
|
48690
50477
|
|
|
48691
|
-
},{"./CommonToken":
|
|
50478
|
+
},{"./CommonToken":263,"./Decorators":267,"./Lexer":275,"./Token":292,"./misc/Interval":379,"assert":410}],259:[function(require,module,exports){
|
|
48692
50479
|
"use strict";
|
|
48693
50480
|
/*!
|
|
48694
50481
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48696,7 +50483,7 @@ exports.BufferedTokenStream = BufferedTokenStream;
|
|
|
48696
50483
|
*/
|
|
48697
50484
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48698
50485
|
|
|
48699
|
-
},{}],
|
|
50486
|
+
},{}],260:[function(require,module,exports){
|
|
48700
50487
|
"use strict";
|
|
48701
50488
|
/*!
|
|
48702
50489
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48830,7 +50617,7 @@ var CharStreams;
|
|
|
48830
50617
|
// }
|
|
48831
50618
|
})(CharStreams = exports.CharStreams || (exports.CharStreams = {}));
|
|
48832
50619
|
|
|
48833
|
-
},{"./CodePointBuffer":
|
|
50620
|
+
},{"./CodePointBuffer":261,"./CodePointCharStream":262,"./IntStream":273}],261:[function(require,module,exports){
|
|
48834
50621
|
"use strict";
|
|
48835
50622
|
/*!
|
|
48836
50623
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -49065,7 +50852,7 @@ exports.CodePointBuffer = CodePointBuffer;
|
|
|
49065
50852
|
CodePointBuffer.Builder = Builder;
|
|
49066
50853
|
})(CodePointBuffer = exports.CodePointBuffer || (exports.CodePointBuffer = {}));
|
|
49067
50854
|
|
|
49068
|
-
},{"./misc/Character":
|
|
50855
|
+
},{"./misc/Character":375,"assert":410}],262:[function(require,module,exports){
|
|
49069
50856
|
"use strict";
|
|
49070
50857
|
/*!
|
|
49071
50858
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -49215,7 +51002,7 @@ __decorate([
|
|
|
49215
51002
|
], CodePointCharStream.prototype, "getText", null);
|
|
49216
51003
|
exports.CodePointCharStream = CodePointCharStream;
|
|
49217
51004
|
|
|
49218
|
-
},{"./Decorators":
|
|
51005
|
+
},{"./Decorators":267,"./IntStream":273,"./misc/Interval":379,"assert":410}],263:[function(require,module,exports){
|
|
49219
51006
|
"use strict";
|
|
49220
51007
|
/*!
|
|
49221
51008
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -49445,7 +51232,7 @@ CommonToken = __decorate([
|
|
|
49445
51232
|
], CommonToken);
|
|
49446
51233
|
exports.CommonToken = CommonToken;
|
|
49447
51234
|
|
|
49448
|
-
},{"./Decorators":
|
|
51235
|
+
},{"./Decorators":267,"./Token":292,"./misc/Interval":379}],264:[function(require,module,exports){
|
|
49449
51236
|
"use strict";
|
|
49450
51237
|
/*!
|
|
49451
51238
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -49509,7 +51296,7 @@ exports.CommonTokenFactory = CommonTokenFactory;
|
|
|
49509
51296
|
CommonTokenFactory.DEFAULT = new CommonTokenFactory();
|
|
49510
51297
|
})(CommonTokenFactory = exports.CommonTokenFactory || (exports.CommonTokenFactory = {}));
|
|
49511
51298
|
|
|
49512
|
-
},{"./CommonToken":
|
|
51299
|
+
},{"./CommonToken":263,"./Decorators":267,"./misc/Interval":379}],265:[function(require,module,exports){
|
|
49513
51300
|
"use strict";
|
|
49514
51301
|
/*!
|
|
49515
51302
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -49636,7 +51423,7 @@ CommonTokenStream = __decorate([
|
|
|
49636
51423
|
], CommonTokenStream);
|
|
49637
51424
|
exports.CommonTokenStream = CommonTokenStream;
|
|
49638
51425
|
|
|
49639
|
-
},{"./BufferedTokenStream":
|
|
51426
|
+
},{"./BufferedTokenStream":258,"./Decorators":267,"./Token":292}],266:[function(require,module,exports){
|
|
49640
51427
|
"use strict";
|
|
49641
51428
|
/*!
|
|
49642
51429
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -49670,7 +51457,7 @@ exports.ConsoleErrorListener = ConsoleErrorListener;
|
|
|
49670
51457
|
*/
|
|
49671
51458
|
ConsoleErrorListener.INSTANCE = new ConsoleErrorListener();
|
|
49672
51459
|
|
|
49673
|
-
},{}],
|
|
51460
|
+
},{}],267:[function(require,module,exports){
|
|
49674
51461
|
"use strict";
|
|
49675
51462
|
/*!
|
|
49676
51463
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -49697,7 +51484,7 @@ function SuppressWarnings(options) {
|
|
|
49697
51484
|
}
|
|
49698
51485
|
exports.SuppressWarnings = SuppressWarnings;
|
|
49699
51486
|
|
|
49700
|
-
},{}],
|
|
51487
|
+
},{}],268:[function(require,module,exports){
|
|
49701
51488
|
"use strict";
|
|
49702
51489
|
/*!
|
|
49703
51490
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -50511,7 +52298,7 @@ __decorate([
|
|
|
50511
52298
|
], DefaultErrorStrategy.prototype, "consumeUntil", null);
|
|
50512
52299
|
exports.DefaultErrorStrategy = DefaultErrorStrategy;
|
|
50513
52300
|
|
|
50514
|
-
},{"./Decorators":
|
|
52301
|
+
},{"./Decorators":267,"./FailedPredicateException":271,"./InputMismatchException":272,"./NoViableAltException":279,"./Token":292,"./atn/ATNState":306,"./atn/ATNStateType":307,"./atn/PredictionContext":347,"./misc/IntervalSet":380}],269:[function(require,module,exports){
|
|
50515
52302
|
"use strict";
|
|
50516
52303
|
/*!
|
|
50517
52304
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -50587,7 +52374,7 @@ var Dependents;
|
|
|
50587
52374
|
Dependents[Dependents["FOLLOWING"] = 9] = "FOLLOWING";
|
|
50588
52375
|
})(Dependents = exports.Dependents || (exports.Dependents = {}));
|
|
50589
52376
|
|
|
50590
|
-
},{}],
|
|
52377
|
+
},{}],270:[function(require,module,exports){
|
|
50591
52378
|
"use strict";
|
|
50592
52379
|
/*!
|
|
50593
52380
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -50735,7 +52522,7 @@ __decorate([
|
|
|
50735
52522
|
], DiagnosticErrorListener.prototype, "getConflictingAlts", null);
|
|
50736
52523
|
exports.DiagnosticErrorListener = DiagnosticErrorListener;
|
|
50737
52524
|
|
|
50738
|
-
},{"./Decorators":
|
|
52525
|
+
},{"./Decorators":267,"./misc/BitSet":374,"./misc/Interval":379}],271:[function(require,module,exports){
|
|
50739
52526
|
"use strict";
|
|
50740
52527
|
/*!
|
|
50741
52528
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -50800,7 +52587,7 @@ FailedPredicateException = __decorate([
|
|
|
50800
52587
|
], FailedPredicateException);
|
|
50801
52588
|
exports.FailedPredicateException = FailedPredicateException;
|
|
50802
52589
|
|
|
50803
|
-
},{"./Decorators":
|
|
52590
|
+
},{"./Decorators":267,"./RecognitionException":286,"./atn/PredicateTransition":346}],272:[function(require,module,exports){
|
|
50804
52591
|
"use strict";
|
|
50805
52592
|
/*!
|
|
50806
52593
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -50840,7 +52627,7 @@ InputMismatchException = __decorate([
|
|
|
50840
52627
|
], InputMismatchException);
|
|
50841
52628
|
exports.InputMismatchException = InputMismatchException;
|
|
50842
52629
|
|
|
50843
|
-
},{"./Decorators":
|
|
52630
|
+
},{"./Decorators":267,"./RecognitionException":286}],273:[function(require,module,exports){
|
|
50844
52631
|
"use strict";
|
|
50845
52632
|
/*!
|
|
50846
52633
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -50863,7 +52650,7 @@ var IntStream;
|
|
|
50863
52650
|
IntStream.UNKNOWN_SOURCE_NAME = "<unknown>";
|
|
50864
52651
|
})(IntStream = exports.IntStream || (exports.IntStream = {}));
|
|
50865
52652
|
|
|
50866
|
-
},{}],
|
|
52653
|
+
},{}],274:[function(require,module,exports){
|
|
50867
52654
|
"use strict";
|
|
50868
52655
|
/*!
|
|
50869
52656
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -50910,7 +52697,7 @@ __decorate([
|
|
|
50910
52697
|
], InterpreterRuleContext.prototype, "ruleIndex", null);
|
|
50911
52698
|
exports.InterpreterRuleContext = InterpreterRuleContext;
|
|
50912
52699
|
|
|
50913
|
-
},{"./Decorators":
|
|
52700
|
+
},{"./Decorators":267,"./ParserRuleContext":283}],275:[function(require,module,exports){
|
|
50914
52701
|
"use strict";
|
|
50915
52702
|
/*!
|
|
50916
52703
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51246,7 +53033,7 @@ __decorate([
|
|
|
51246
53033
|
], Lexer.prototype, "charPositionInLine", null);
|
|
51247
53034
|
exports.Lexer = Lexer;
|
|
51248
53035
|
|
|
51249
|
-
},{"./CommonTokenFactory":
|
|
53036
|
+
},{"./CommonTokenFactory":264,"./Decorators":267,"./IntStream":273,"./LexerNoViableAltException":277,"./Recognizer":287,"./Token":292,"./atn/LexerATNSimulator":325,"./misc/IntegerStack":378,"./misc/Interval":379}],276:[function(require,module,exports){
|
|
51250
53037
|
"use strict";
|
|
51251
53038
|
/*!
|
|
51252
53039
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51326,7 +53113,7 @@ LexerInterpreter = __decorate([
|
|
|
51326
53113
|
], LexerInterpreter);
|
|
51327
53114
|
exports.LexerInterpreter = LexerInterpreter;
|
|
51328
53115
|
|
|
51329
|
-
},{"./Decorators":
|
|
53116
|
+
},{"./Decorators":267,"./Lexer":275,"./atn/LexerATNSimulator":325}],277:[function(require,module,exports){
|
|
51330
53117
|
"use strict";
|
|
51331
53118
|
/*!
|
|
51332
53119
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51383,7 +53170,7 @@ LexerNoViableAltException = __decorate([
|
|
|
51383
53170
|
], LexerNoViableAltException);
|
|
51384
53171
|
exports.LexerNoViableAltException = LexerNoViableAltException;
|
|
51385
53172
|
|
|
51386
|
-
},{"./Decorators":
|
|
53173
|
+
},{"./Decorators":267,"./RecognitionException":286,"./misc/Interval":379,"./misc/Utils":386}],278:[function(require,module,exports){
|
|
51387
53174
|
"use strict";
|
|
51388
53175
|
/*!
|
|
51389
53176
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51593,7 +53380,7 @@ ListTokenSource = __decorate([
|
|
|
51593
53380
|
], ListTokenSource);
|
|
51594
53381
|
exports.ListTokenSource = ListTokenSource;
|
|
51595
53382
|
|
|
51596
|
-
},{"./CommonTokenFactory":
|
|
53383
|
+
},{"./CommonTokenFactory":264,"./Decorators":267,"./Token":292}],279:[function(require,module,exports){
|
|
51597
53384
|
"use strict";
|
|
51598
53385
|
/*!
|
|
51599
53386
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51648,7 +53435,7 @@ __decorate([
|
|
|
51648
53435
|
], NoViableAltException.prototype, "_startToken", void 0);
|
|
51649
53436
|
exports.NoViableAltException = NoViableAltException;
|
|
51650
53437
|
|
|
51651
|
-
},{"./Decorators":
|
|
53438
|
+
},{"./Decorators":267,"./Parser":280,"./RecognitionException":286}],280:[function(require,module,exports){
|
|
51652
53439
|
(function (process){(function (){
|
|
51653
53440
|
"use strict";
|
|
51654
53441
|
/*!
|
|
@@ -52494,7 +54281,7 @@ __decorate([
|
|
|
52494
54281
|
exports.Parser = Parser;
|
|
52495
54282
|
|
|
52496
54283
|
}).call(this)}).call(this,require('_process'))
|
|
52497
|
-
},{"./Decorators":
|
|
54284
|
+
},{"./Decorators":267,"./DefaultErrorStrategy":268,"./Lexer":275,"./ProxyParserErrorListener":285,"./Recognizer":287,"./Token":292,"./atn/ATNDeserializationOptions":303,"./atn/ATNDeserializer":304,"./atn/ParseInfo":340,"./atn/ParserATNSimulator":341,"./atn/ProfilingATNSimulator":350,"./misc/IntegerStack":378,"./misc/Utils":386,"./tree/ErrorNode":387,"./tree/TerminalNode":390,"./tree/pattern/ParseTreePatternMatcher":395,"_process":469}],281:[function(require,module,exports){
|
|
52498
54285
|
"use strict";
|
|
52499
54286
|
/*!
|
|
52500
54287
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -52502,7 +54289,7 @@ exports.Parser = Parser;
|
|
|
52502
54289
|
*/
|
|
52503
54290
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52504
54291
|
|
|
52505
|
-
},{}],
|
|
54292
|
+
},{}],282:[function(require,module,exports){
|
|
52506
54293
|
"use strict";
|
|
52507
54294
|
/*!
|
|
52508
54295
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -52910,7 +54697,7 @@ ParserInterpreter = __decorate([
|
|
|
52910
54697
|
], ParserInterpreter);
|
|
52911
54698
|
exports.ParserInterpreter = ParserInterpreter;
|
|
52912
54699
|
|
|
52913
|
-
},{"./Decorators":
|
|
54700
|
+
},{"./Decorators":267,"./FailedPredicateException":271,"./InputMismatchException":272,"./InterpreterRuleContext":274,"./Parser":280,"./RecognitionException":286,"./Token":292,"./atn/ATNState":306,"./atn/ATNStateType":307,"./atn/LoopEndState":337,"./atn/ParserATNSimulator":341,"./atn/StarLoopEntryState":359,"./misc/BitSet":374}],283:[function(require,module,exports){
|
|
52914
54701
|
"use strict";
|
|
52915
54702
|
/*!
|
|
52916
54703
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53211,7 +54998,7 @@ __decorate([
|
|
|
53211
54998
|
], ParserRuleContext.prototype, "sourceInterval", null);
|
|
53212
54999
|
exports.ParserRuleContext = ParserRuleContext;
|
|
53213
55000
|
|
|
53214
|
-
},{"./Decorators":
|
|
55001
|
+
},{"./Decorators":267,"./RuleContext":288,"./misc/Interval":379,"./tree/ErrorNode":387,"./tree/TerminalNode":390}],284:[function(require,module,exports){
|
|
53215
55002
|
"use strict";
|
|
53216
55003
|
/*!
|
|
53217
55004
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53261,7 +55048,7 @@ __decorate([
|
|
|
53261
55048
|
], ProxyErrorListener.prototype, "syntaxError", null);
|
|
53262
55049
|
exports.ProxyErrorListener = ProxyErrorListener;
|
|
53263
55050
|
|
|
53264
|
-
},{"./Decorators":
|
|
55051
|
+
},{"./Decorators":267}],285:[function(require,module,exports){
|
|
53265
55052
|
"use strict";
|
|
53266
55053
|
/*!
|
|
53267
55054
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53320,7 +55107,7 @@ __decorate([
|
|
|
53320
55107
|
], ProxyParserErrorListener.prototype, "reportContextSensitivity", null);
|
|
53321
55108
|
exports.ProxyParserErrorListener = ProxyParserErrorListener;
|
|
53322
55109
|
|
|
53323
|
-
},{"./Decorators":
|
|
55110
|
+
},{"./Decorators":267,"./ProxyErrorListener":284}],286:[function(require,module,exports){
|
|
53324
55111
|
"use strict";
|
|
53325
55112
|
/*!
|
|
53326
55113
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53425,7 +55212,7 @@ class RecognitionException extends Error {
|
|
|
53425
55212
|
}
|
|
53426
55213
|
exports.RecognitionException = RecognitionException;
|
|
53427
55214
|
|
|
53428
|
-
},{}],
|
|
55215
|
+
},{}],287:[function(require,module,exports){
|
|
53429
55216
|
"use strict";
|
|
53430
55217
|
/*!
|
|
53431
55218
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53644,7 +55431,7 @@ __decorate([
|
|
|
53644
55431
|
], Recognizer.prototype, "getErrorListeners", null);
|
|
53645
55432
|
exports.Recognizer = Recognizer;
|
|
53646
55433
|
|
|
53647
|
-
},{"./ConsoleErrorListener":
|
|
55434
|
+
},{"./ConsoleErrorListener":266,"./Decorators":267,"./ProxyErrorListener":284,"./Token":292,"./misc/Utils":386}],288:[function(require,module,exports){
|
|
53648
55435
|
"use strict";
|
|
53649
55436
|
/*!
|
|
53650
55437
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53861,7 +55648,7 @@ __decorate([
|
|
|
53861
55648
|
], RuleContext.prototype, "toStringTree", null);
|
|
53862
55649
|
exports.RuleContext = RuleContext;
|
|
53863
55650
|
|
|
53864
|
-
},{"./Decorators":
|
|
55651
|
+
},{"./Decorators":267,"./ParserRuleContext":283,"./Recognizer":287,"./atn/ATN":300,"./misc/Interval":379,"./tree/RuleNode":389,"./tree/Trees":391}],289:[function(require,module,exports){
|
|
53865
55652
|
"use strict";
|
|
53866
55653
|
/*!
|
|
53867
55654
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53912,7 +55699,7 @@ __decorate([
|
|
|
53912
55699
|
], RuleContextWithAltNum.prototype, "altNumber", null);
|
|
53913
55700
|
exports.RuleContextWithAltNum = RuleContextWithAltNum;
|
|
53914
55701
|
|
|
53915
|
-
},{"./Decorators":
|
|
55702
|
+
},{"./Decorators":267,"./ParserRuleContext":283,"./atn/ATN":300}],290:[function(require,module,exports){
|
|
53916
55703
|
"use strict";
|
|
53917
55704
|
/*!
|
|
53918
55705
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53935,7 +55722,7 @@ function RuleDependency(dependency) {
|
|
|
53935
55722
|
}
|
|
53936
55723
|
exports.RuleDependency = RuleDependency;
|
|
53937
55724
|
|
|
53938
|
-
},{}],
|
|
55725
|
+
},{}],291:[function(require,module,exports){
|
|
53939
55726
|
"use strict";
|
|
53940
55727
|
/*!
|
|
53941
55728
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53954,7 +55741,7 @@ function RuleVersion(version) {
|
|
|
53954
55741
|
}
|
|
53955
55742
|
exports.RuleVersion = RuleVersion;
|
|
53956
55743
|
|
|
53957
|
-
},{}],
|
|
55744
|
+
},{}],292:[function(require,module,exports){
|
|
53958
55745
|
"use strict";
|
|
53959
55746
|
/*!
|
|
53960
55747
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53994,7 +55781,7 @@ var Token;
|
|
|
53994
55781
|
Token.MIN_USER_CHANNEL_VALUE = 2;
|
|
53995
55782
|
})(Token = exports.Token || (exports.Token = {}));
|
|
53996
55783
|
|
|
53997
|
-
},{"./IntStream":
|
|
55784
|
+
},{"./IntStream":273}],293:[function(require,module,exports){
|
|
53998
55785
|
"use strict";
|
|
53999
55786
|
/*!
|
|
54000
55787
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54002,7 +55789,7 @@ var Token;
|
|
|
54002
55789
|
*/
|
|
54003
55790
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54004
55791
|
|
|
54005
|
-
},{}],
|
|
55792
|
+
},{}],294:[function(require,module,exports){
|
|
54006
55793
|
"use strict";
|
|
54007
55794
|
/*!
|
|
54008
55795
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54010,7 +55797,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
54010
55797
|
*/
|
|
54011
55798
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54012
55799
|
|
|
54013
|
-
},{}],
|
|
55800
|
+
},{}],295:[function(require,module,exports){
|
|
54014
55801
|
"use strict";
|
|
54015
55802
|
/*!
|
|
54016
55803
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54018,7 +55805,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
54018
55805
|
*/
|
|
54019
55806
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54020
55807
|
|
|
54021
|
-
},{}],
|
|
55808
|
+
},{}],296:[function(require,module,exports){
|
|
54022
55809
|
"use strict";
|
|
54023
55810
|
/*!
|
|
54024
55811
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54526,7 +56313,7 @@ __decorate([
|
|
|
54526
56313
|
Decorators_1.Override
|
|
54527
56314
|
], ReplaceOp.prototype, "toString", null);
|
|
54528
56315
|
|
|
54529
|
-
},{"./Decorators":
|
|
56316
|
+
},{"./Decorators":267,"./Token":292,"./misc/Interval":379}],297:[function(require,module,exports){
|
|
54530
56317
|
"use strict";
|
|
54531
56318
|
/*!
|
|
54532
56319
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54534,7 +56321,7 @@ __decorate([
|
|
|
54534
56321
|
*/
|
|
54535
56322
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54536
56323
|
|
|
54537
|
-
},{}],
|
|
56324
|
+
},{}],298:[function(require,module,exports){
|
|
54538
56325
|
"use strict";
|
|
54539
56326
|
/*!
|
|
54540
56327
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54654,7 +56441,7 @@ __decorate([
|
|
|
54654
56441
|
], VocabularyImpl, "EMPTY_VOCABULARY", void 0);
|
|
54655
56442
|
exports.VocabularyImpl = VocabularyImpl;
|
|
54656
56443
|
|
|
54657
|
-
},{"./Decorators":
|
|
56444
|
+
},{"./Decorators":267,"./Token":292}],299:[function(require,module,exports){
|
|
54658
56445
|
"use strict";
|
|
54659
56446
|
/*!
|
|
54660
56447
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54662,7 +56449,7 @@ exports.VocabularyImpl = VocabularyImpl;
|
|
|
54662
56449
|
*/
|
|
54663
56450
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54664
56451
|
|
|
54665
|
-
},{}],
|
|
56452
|
+
},{}],300:[function(require,module,exports){
|
|
54666
56453
|
"use strict";
|
|
54667
56454
|
/*!
|
|
54668
56455
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54884,7 +56671,7 @@ exports.ATN = ATN;
|
|
|
54884
56671
|
})(ATN = exports.ATN || (exports.ATN = {}));
|
|
54885
56672
|
exports.ATN = ATN;
|
|
54886
56673
|
|
|
54887
|
-
},{"../Decorators":
|
|
56674
|
+
},{"../Decorators":267,"../Token":292,"../dfa/DFA":365,"../misc/Array2DHashMap":370,"../misc/IntervalSet":380,"../misc/ObjectEqualityComparator":383,"./InvalidState":323,"./LL1Analyzer":324,"./PredictionContext":347,"assert":410}],301:[function(require,module,exports){
|
|
54888
56675
|
"use strict";
|
|
54889
56676
|
/*!
|
|
54890
56677
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -55409,7 +57196,7 @@ ActionSemanticContextATNConfig = __decorate([
|
|
|
55409
57196
|
__param(1, Decorators_1.NotNull), __param(2, Decorators_1.NotNull)
|
|
55410
57197
|
], ActionSemanticContextATNConfig);
|
|
55411
57198
|
|
|
55412
|
-
},{"../Decorators":
|
|
57199
|
+
},{"../Decorators":267,"../misc/Array2DHashMap":370,"../misc/MurmurHash":382,"../misc/ObjectEqualityComparator":383,"./DecisionState":320,"./PredictionContext":347,"./SemanticContext":355,"assert":410}],302:[function(require,module,exports){
|
|
55413
57200
|
"use strict";
|
|
55414
57201
|
/*!
|
|
55415
57202
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -55856,7 +57643,7 @@ __decorate([
|
|
|
55856
57643
|
], ATNConfigSet.prototype, "hashCode", null);
|
|
55857
57644
|
exports.ATNConfigSet = ATNConfigSet;
|
|
55858
57645
|
|
|
55859
|
-
},{"../Decorators":
|
|
57646
|
+
},{"../Decorators":267,"../misc/Array2DHashMap":370,"../misc/Array2DHashSet":371,"../misc/ArrayEqualityComparator":372,"../misc/BitSet":374,"../misc/ObjectEqualityComparator":383,"../misc/Utils":386,"./ATN":300,"./ATNConfig":301,"./PredictionContext":347,"./PredictionContextCache":348,"./SemanticContext":355,"assert":410}],303:[function(require,module,exports){
|
|
55860
57647
|
"use strict";
|
|
55861
57648
|
/*!
|
|
55862
57649
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -55935,7 +57722,7 @@ __decorate([
|
|
|
55935
57722
|
], ATNDeserializationOptions, "defaultOptions", null);
|
|
55936
57723
|
exports.ATNDeserializationOptions = ATNDeserializationOptions;
|
|
55937
57724
|
|
|
55938
|
-
},{"../Decorators":
|
|
57725
|
+
},{"../Decorators":267}],304:[function(require,module,exports){
|
|
55939
57726
|
"use strict";
|
|
55940
57727
|
/*!
|
|
55941
57728
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57022,7 +58809,7 @@ __decorate([
|
|
|
57022
58809
|
], ATNDeserializer.prototype, "edgeFactory", null);
|
|
57023
58810
|
exports.ATNDeserializer = ATNDeserializer;
|
|
57024
58811
|
|
|
57025
|
-
},{"../Decorators":
|
|
58812
|
+
},{"../Decorators":267,"../Token":292,"../dfa/DFA":365,"../misc/Array2DHashSet":371,"../misc/BitSet":374,"../misc/IntervalSet":380,"../misc/UUID":385,"./ATN":300,"./ATNDeserializationOptions":303,"./ATNStateType":307,"./ActionTransition":309,"./AtomTransition":311,"./BasicBlockStartState":312,"./BasicState":313,"./BlockEndState":314,"./BlockStartState":315,"./DecisionState":320,"./EpsilonTransition":321,"./InvalidState":323,"./LexerChannelAction":327,"./LexerCustomAction":328,"./LexerModeAction":330,"./LexerMoreAction":331,"./LexerPopModeAction":332,"./LexerPushModeAction":333,"./LexerSkipAction":334,"./LexerTypeAction":335,"./LoopEndState":337,"./NotSetTransition":338,"./ParserATNSimulator":341,"./PlusBlockStartState":342,"./PlusLoopbackState":343,"./PrecedencePredicateTransition":344,"./PredicateTransition":346,"./RangeTransition":351,"./RuleStartState":352,"./RuleStopState":353,"./RuleTransition":354,"./SetTransition":356,"./StarBlockStartState":358,"./StarLoopEntryState":359,"./StarLoopbackState":360,"./TokensStartState":361,"./WildcardTransition":363}],305:[function(require,module,exports){
|
|
57026
58813
|
"use strict";
|
|
57027
58814
|
/*!
|
|
57028
58815
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57086,7 +58873,7 @@ exports.ATNSimulator = ATNSimulator;
|
|
|
57086
58873
|
})(ATNSimulator = exports.ATNSimulator || (exports.ATNSimulator = {}));
|
|
57087
58874
|
exports.ATNSimulator = ATNSimulator;
|
|
57088
58875
|
|
|
57089
|
-
},{"../Decorators":
|
|
58876
|
+
},{"../Decorators":267,"../dfa/DFAState":367,"./ATNConfigSet":302,"./PredictionContext":347}],306:[function(require,module,exports){
|
|
57090
58877
|
"use strict";
|
|
57091
58878
|
/*!
|
|
57092
58879
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57273,7 +59060,7 @@ exports.ATNState = ATNState;
|
|
|
57273
59060
|
ATNState.INVALID_STATE_NUMBER = -1;
|
|
57274
59061
|
})(ATNState = exports.ATNState || (exports.ATNState = {}));
|
|
57275
59062
|
|
|
57276
|
-
},{"../Decorators":
|
|
59063
|
+
},{"../Decorators":267}],307:[function(require,module,exports){
|
|
57277
59064
|
"use strict";
|
|
57278
59065
|
/*!
|
|
57279
59066
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57299,7 +59086,7 @@ var ATNStateType;
|
|
|
57299
59086
|
ATNStateType[ATNStateType["LOOP_END"] = 12] = "LOOP_END";
|
|
57300
59087
|
})(ATNStateType = exports.ATNStateType || (exports.ATNStateType = {}));
|
|
57301
59088
|
|
|
57302
|
-
},{}],
|
|
59089
|
+
},{}],308:[function(require,module,exports){
|
|
57303
59090
|
"use strict";
|
|
57304
59091
|
/*!
|
|
57305
59092
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57319,7 +59106,7 @@ class AbstractPredicateTransition extends Transition_1.Transition {
|
|
|
57319
59106
|
}
|
|
57320
59107
|
exports.AbstractPredicateTransition = AbstractPredicateTransition;
|
|
57321
59108
|
|
|
57322
|
-
},{"./Transition":
|
|
59109
|
+
},{"./Transition":362}],309:[function(require,module,exports){
|
|
57323
59110
|
"use strict";
|
|
57324
59111
|
/*!
|
|
57325
59112
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57375,7 +59162,7 @@ ActionTransition = __decorate([
|
|
|
57375
59162
|
], ActionTransition);
|
|
57376
59163
|
exports.ActionTransition = ActionTransition;
|
|
57377
59164
|
|
|
57378
|
-
},{"../Decorators":
|
|
59165
|
+
},{"../Decorators":267,"./Transition":362}],310:[function(require,module,exports){
|
|
57379
59166
|
"use strict";
|
|
57380
59167
|
/*!
|
|
57381
59168
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57462,7 +59249,7 @@ AmbiguityInfo = __decorate([
|
|
|
57462
59249
|
], AmbiguityInfo);
|
|
57463
59250
|
exports.AmbiguityInfo = AmbiguityInfo;
|
|
57464
59251
|
|
|
57465
|
-
},{"../Decorators":
|
|
59252
|
+
},{"../Decorators":267,"./DecisionEventInfo":318}],311:[function(require,module,exports){
|
|
57466
59253
|
"use strict";
|
|
57467
59254
|
/*!
|
|
57468
59255
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57520,7 +59307,7 @@ AtomTransition = __decorate([
|
|
|
57520
59307
|
], AtomTransition);
|
|
57521
59308
|
exports.AtomTransition = AtomTransition;
|
|
57522
59309
|
|
|
57523
|
-
},{"../Decorators":
|
|
59310
|
+
},{"../Decorators":267,"../misc/IntervalSet":380,"./Transition":362}],312:[function(require,module,exports){
|
|
57524
59311
|
"use strict";
|
|
57525
59312
|
/*!
|
|
57526
59313
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57552,7 +59339,7 @@ __decorate([
|
|
|
57552
59339
|
], BasicBlockStartState.prototype, "stateType", null);
|
|
57553
59340
|
exports.BasicBlockStartState = BasicBlockStartState;
|
|
57554
59341
|
|
|
57555
|
-
},{"../Decorators":
|
|
59342
|
+
},{"../Decorators":267,"./ATNStateType":307,"./BlockStartState":315}],313:[function(require,module,exports){
|
|
57556
59343
|
"use strict";
|
|
57557
59344
|
/*!
|
|
57558
59345
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57584,7 +59371,7 @@ __decorate([
|
|
|
57584
59371
|
], BasicState.prototype, "stateType", null);
|
|
57585
59372
|
exports.BasicState = BasicState;
|
|
57586
59373
|
|
|
57587
|
-
},{"../Decorators":
|
|
59374
|
+
},{"../Decorators":267,"./ATNState":306,"./ATNStateType":307}],314:[function(require,module,exports){
|
|
57588
59375
|
"use strict";
|
|
57589
59376
|
/*!
|
|
57590
59377
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57613,7 +59400,7 @@ __decorate([
|
|
|
57613
59400
|
], BlockEndState.prototype, "stateType", null);
|
|
57614
59401
|
exports.BlockEndState = BlockEndState;
|
|
57615
59402
|
|
|
57616
|
-
},{"../Decorators":
|
|
59403
|
+
},{"../Decorators":267,"./ATNState":306,"./ATNStateType":307}],315:[function(require,module,exports){
|
|
57617
59404
|
"use strict";
|
|
57618
59405
|
/*!
|
|
57619
59406
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57627,7 +59414,7 @@ class BlockStartState extends DecisionState_1.DecisionState {
|
|
|
57627
59414
|
}
|
|
57628
59415
|
exports.BlockStartState = BlockStartState;
|
|
57629
59416
|
|
|
57630
|
-
},{"./DecisionState":
|
|
59417
|
+
},{"./DecisionState":320}],316:[function(require,module,exports){
|
|
57631
59418
|
"use strict";
|
|
57632
59419
|
/*!
|
|
57633
59420
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57697,7 +59484,7 @@ __decorate([
|
|
|
57697
59484
|
], ConflictInfo.prototype, "hashCode", null);
|
|
57698
59485
|
exports.ConflictInfo = ConflictInfo;
|
|
57699
59486
|
|
|
57700
|
-
},{"../Decorators":
|
|
59487
|
+
},{"../Decorators":267,"../misc/Utils":386}],317:[function(require,module,exports){
|
|
57701
59488
|
"use strict";
|
|
57702
59489
|
/*!
|
|
57703
59490
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57757,7 +59544,7 @@ ContextSensitivityInfo = __decorate([
|
|
|
57757
59544
|
], ContextSensitivityInfo);
|
|
57758
59545
|
exports.ContextSensitivityInfo = ContextSensitivityInfo;
|
|
57759
59546
|
|
|
57760
|
-
},{"../Decorators":
|
|
59547
|
+
},{"../Decorators":267,"./DecisionEventInfo":318}],318:[function(require,module,exports){
|
|
57761
59548
|
"use strict";
|
|
57762
59549
|
/*!
|
|
57763
59550
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57809,7 +59596,7 @@ DecisionEventInfo = __decorate([
|
|
|
57809
59596
|
], DecisionEventInfo);
|
|
57810
59597
|
exports.DecisionEventInfo = DecisionEventInfo;
|
|
57811
59598
|
|
|
57812
|
-
},{"../Decorators":
|
|
59599
|
+
},{"../Decorators":267}],319:[function(require,module,exports){
|
|
57813
59600
|
"use strict";
|
|
57814
59601
|
/*!
|
|
57815
59602
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58022,7 +59809,7 @@ __decorate([
|
|
|
58022
59809
|
], DecisionInfo.prototype, "toString", null);
|
|
58023
59810
|
exports.DecisionInfo = DecisionInfo;
|
|
58024
59811
|
|
|
58025
|
-
},{"../Decorators":
|
|
59812
|
+
},{"../Decorators":267}],320:[function(require,module,exports){
|
|
58026
59813
|
"use strict";
|
|
58027
59814
|
/*!
|
|
58028
59815
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58042,7 +59829,7 @@ class DecisionState extends ATNState_1.ATNState {
|
|
|
58042
59829
|
}
|
|
58043
59830
|
exports.DecisionState = DecisionState;
|
|
58044
59831
|
|
|
58045
|
-
},{"./ATNState":
|
|
59832
|
+
},{"./ATNState":306}],321:[function(require,module,exports){
|
|
58046
59833
|
"use strict";
|
|
58047
59834
|
/*!
|
|
58048
59835
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58108,7 +59895,7 @@ EpsilonTransition = __decorate([
|
|
|
58108
59895
|
], EpsilonTransition);
|
|
58109
59896
|
exports.EpsilonTransition = EpsilonTransition;
|
|
58110
59897
|
|
|
58111
|
-
},{"../Decorators":
|
|
59898
|
+
},{"../Decorators":267,"./Transition":362}],322:[function(require,module,exports){
|
|
58112
59899
|
"use strict";
|
|
58113
59900
|
/*!
|
|
58114
59901
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58161,7 +59948,7 @@ ErrorInfo = __decorate([
|
|
|
58161
59948
|
], ErrorInfo);
|
|
58162
59949
|
exports.ErrorInfo = ErrorInfo;
|
|
58163
59950
|
|
|
58164
|
-
},{"../Decorators":
|
|
59951
|
+
},{"../Decorators":267,"./DecisionEventInfo":318}],323:[function(require,module,exports){
|
|
58165
59952
|
"use strict";
|
|
58166
59953
|
/*!
|
|
58167
59954
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58192,7 +59979,7 @@ __decorate([
|
|
|
58192
59979
|
], InvalidState.prototype, "stateType", null);
|
|
58193
59980
|
exports.InvalidState = InvalidState;
|
|
58194
59981
|
|
|
58195
|
-
},{"../Decorators":
|
|
59982
|
+
},{"../Decorators":267,"./ATNStateType":307,"./BasicState":313}],324:[function(require,module,exports){
|
|
58196
59983
|
"use strict";
|
|
58197
59984
|
/*!
|
|
58198
59985
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58414,7 +60201,7 @@ LL1Analyzer = __decorate([
|
|
|
58414
60201
|
], LL1Analyzer);
|
|
58415
60202
|
exports.LL1Analyzer = LL1Analyzer;
|
|
58416
60203
|
|
|
58417
|
-
},{"../Decorators":
|
|
60204
|
+
},{"../Decorators":267,"../Token":292,"../misc/Array2DHashSet":371,"../misc/BitSet":374,"../misc/IntervalSet":380,"../misc/ObjectEqualityComparator":383,"./ATNConfig":301,"./AbstractPredicateTransition":308,"./NotSetTransition":338,"./PredictionContext":347,"./RuleStopState":353,"./RuleTransition":354,"./WildcardTransition":363}],325:[function(require,module,exports){
|
|
58418
60205
|
"use strict";
|
|
58419
60206
|
/*!
|
|
58420
60207
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59131,7 +60918,7 @@ exports.LexerATNSimulator = LexerATNSimulator;
|
|
|
59131
60918
|
})(LexerATNSimulator = exports.LexerATNSimulator || (exports.LexerATNSimulator = {}));
|
|
59132
60919
|
exports.LexerATNSimulator = LexerATNSimulator;
|
|
59133
60920
|
|
|
59134
|
-
},{"../Decorators":
|
|
60921
|
+
},{"../Decorators":267,"../IntStream":273,"../Lexer":275,"../LexerNoViableAltException":277,"../Token":292,"../dfa/AcceptStateInfo":364,"../dfa/DFAState":367,"../misc/Interval":379,"./ATN":300,"./ATNConfig":301,"./ATNConfigSet":302,"./ATNSimulator":305,"./LexerActionExecutor":326,"./OrderedATNConfigSet":339,"./PredictionContext":347,"./RuleStopState":353,"assert":410}],326:[function(require,module,exports){
|
|
59135
60922
|
"use strict";
|
|
59136
60923
|
/*!
|
|
59137
60924
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59332,7 +61119,7 @@ LexerActionExecutor = __decorate([
|
|
|
59332
61119
|
], LexerActionExecutor);
|
|
59333
61120
|
exports.LexerActionExecutor = LexerActionExecutor;
|
|
59334
61121
|
|
|
59335
|
-
},{"../Decorators":
|
|
61122
|
+
},{"../Decorators":267,"../misc/ArrayEqualityComparator":372,"../misc/MurmurHash":382,"./LexerIndexedCustomAction":329}],327:[function(require,module,exports){
|
|
59336
61123
|
"use strict";
|
|
59337
61124
|
/*!
|
|
59338
61125
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59437,7 +61224,7 @@ __decorate([
|
|
|
59437
61224
|
], LexerChannelAction.prototype, "toString", null);
|
|
59438
61225
|
exports.LexerChannelAction = LexerChannelAction;
|
|
59439
61226
|
|
|
59440
|
-
},{"../Decorators":
|
|
61227
|
+
},{"../Decorators":267,"../misc/MurmurHash":382}],328:[function(require,module,exports){
|
|
59441
61228
|
"use strict";
|
|
59442
61229
|
/*!
|
|
59443
61230
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59566,7 +61353,7 @@ __decorate([
|
|
|
59566
61353
|
], LexerCustomAction.prototype, "equals", null);
|
|
59567
61354
|
exports.LexerCustomAction = LexerCustomAction;
|
|
59568
61355
|
|
|
59569
|
-
},{"../Decorators":
|
|
61356
|
+
},{"../Decorators":267,"../misc/MurmurHash":382}],329:[function(require,module,exports){
|
|
59570
61357
|
"use strict";
|
|
59571
61358
|
/*!
|
|
59572
61359
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59701,7 +61488,7 @@ LexerIndexedCustomAction = __decorate([
|
|
|
59701
61488
|
], LexerIndexedCustomAction);
|
|
59702
61489
|
exports.LexerIndexedCustomAction = LexerIndexedCustomAction;
|
|
59703
61490
|
|
|
59704
|
-
},{"../Decorators":
|
|
61491
|
+
},{"../Decorators":267,"../misc/MurmurHash":382}],330:[function(require,module,exports){
|
|
59705
61492
|
"use strict";
|
|
59706
61493
|
/*!
|
|
59707
61494
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59806,7 +61593,7 @@ __decorate([
|
|
|
59806
61593
|
], LexerModeAction.prototype, "toString", null);
|
|
59807
61594
|
exports.LexerModeAction = LexerModeAction;
|
|
59808
61595
|
|
|
59809
|
-
},{"../Decorators":
|
|
61596
|
+
},{"../Decorators":267,"../misc/MurmurHash":382}],331:[function(require,module,exports){
|
|
59810
61597
|
"use strict";
|
|
59811
61598
|
/*!
|
|
59812
61599
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59902,7 +61689,7 @@ exports.LexerMoreAction = LexerMoreAction;
|
|
|
59902
61689
|
LexerMoreAction.INSTANCE = new LexerMoreAction();
|
|
59903
61690
|
})(LexerMoreAction = exports.LexerMoreAction || (exports.LexerMoreAction = {}));
|
|
59904
61691
|
|
|
59905
|
-
},{"../Decorators":
|
|
61692
|
+
},{"../Decorators":267,"../misc/MurmurHash":382}],332:[function(require,module,exports){
|
|
59906
61693
|
"use strict";
|
|
59907
61694
|
/*!
|
|
59908
61695
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59998,7 +61785,7 @@ exports.LexerPopModeAction = LexerPopModeAction;
|
|
|
59998
61785
|
LexerPopModeAction.INSTANCE = new LexerPopModeAction();
|
|
59999
61786
|
})(LexerPopModeAction = exports.LexerPopModeAction || (exports.LexerPopModeAction = {}));
|
|
60000
61787
|
|
|
60001
|
-
},{"../Decorators":
|
|
61788
|
+
},{"../Decorators":267,"../misc/MurmurHash":382}],333:[function(require,module,exports){
|
|
60002
61789
|
"use strict";
|
|
60003
61790
|
/*!
|
|
60004
61791
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60103,7 +61890,7 @@ __decorate([
|
|
|
60103
61890
|
], LexerPushModeAction.prototype, "toString", null);
|
|
60104
61891
|
exports.LexerPushModeAction = LexerPushModeAction;
|
|
60105
61892
|
|
|
60106
|
-
},{"../Decorators":
|
|
61893
|
+
},{"../Decorators":267,"../misc/MurmurHash":382}],334:[function(require,module,exports){
|
|
60107
61894
|
"use strict";
|
|
60108
61895
|
/*!
|
|
60109
61896
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60199,7 +61986,7 @@ exports.LexerSkipAction = LexerSkipAction;
|
|
|
60199
61986
|
LexerSkipAction.INSTANCE = new LexerSkipAction();
|
|
60200
61987
|
})(LexerSkipAction = exports.LexerSkipAction || (exports.LexerSkipAction = {}));
|
|
60201
61988
|
|
|
60202
|
-
},{"../Decorators":
|
|
61989
|
+
},{"../Decorators":267,"../misc/MurmurHash":382}],335:[function(require,module,exports){
|
|
60203
61990
|
"use strict";
|
|
60204
61991
|
/*!
|
|
60205
61992
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60303,7 +62090,7 @@ __decorate([
|
|
|
60303
62090
|
], LexerTypeAction.prototype, "toString", null);
|
|
60304
62091
|
exports.LexerTypeAction = LexerTypeAction;
|
|
60305
62092
|
|
|
60306
|
-
},{"../Decorators":
|
|
62093
|
+
},{"../Decorators":267,"../misc/MurmurHash":382}],336:[function(require,module,exports){
|
|
60307
62094
|
"use strict";
|
|
60308
62095
|
/*!
|
|
60309
62096
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60355,7 +62142,7 @@ LookaheadEventInfo = __decorate([
|
|
|
60355
62142
|
], LookaheadEventInfo);
|
|
60356
62143
|
exports.LookaheadEventInfo = LookaheadEventInfo;
|
|
60357
62144
|
|
|
60358
|
-
},{"../Decorators":
|
|
62145
|
+
},{"../Decorators":267,"./DecisionEventInfo":318}],337:[function(require,module,exports){
|
|
60359
62146
|
"use strict";
|
|
60360
62147
|
/*!
|
|
60361
62148
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60384,7 +62171,7 @@ __decorate([
|
|
|
60384
62171
|
], LoopEndState.prototype, "stateType", null);
|
|
60385
62172
|
exports.LoopEndState = LoopEndState;
|
|
60386
62173
|
|
|
60387
|
-
},{"../Decorators":
|
|
62174
|
+
},{"../Decorators":267,"./ATNState":306,"./ATNStateType":307}],338:[function(require,module,exports){
|
|
60388
62175
|
"use strict";
|
|
60389
62176
|
/*!
|
|
60390
62177
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60433,7 +62220,7 @@ NotSetTransition = __decorate([
|
|
|
60433
62220
|
], NotSetTransition);
|
|
60434
62221
|
exports.NotSetTransition = NotSetTransition;
|
|
60435
62222
|
|
|
60436
|
-
},{"../Decorators":
|
|
62223
|
+
},{"../Decorators":267,"./SetTransition":356}],339:[function(require,module,exports){
|
|
60437
62224
|
"use strict";
|
|
60438
62225
|
/*!
|
|
60439
62226
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60488,7 +62275,7 @@ __decorate([
|
|
|
60488
62275
|
], OrderedATNConfigSet.prototype, "canMerge", null);
|
|
60489
62276
|
exports.OrderedATNConfigSet = OrderedATNConfigSet;
|
|
60490
62277
|
|
|
60491
|
-
},{"../Decorators":
|
|
62278
|
+
},{"../Decorators":267,"./ATNConfigSet":302}],340:[function(require,module,exports){
|
|
60492
62279
|
"use strict";
|
|
60493
62280
|
/*!
|
|
60494
62281
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60650,7 +62437,7 @@ ParseInfo = __decorate([
|
|
|
60650
62437
|
], ParseInfo);
|
|
60651
62438
|
exports.ParseInfo = ParseInfo;
|
|
60652
62439
|
|
|
60653
|
-
},{"../Decorators":
|
|
62440
|
+
},{"../Decorators":267}],341:[function(require,module,exports){
|
|
60654
62441
|
"use strict";
|
|
60655
62442
|
/*!
|
|
60656
62443
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -62923,7 +64710,7 @@ ParserATNSimulator = __decorate([
|
|
|
62923
64710
|
], ParserATNSimulator);
|
|
62924
64711
|
exports.ParserATNSimulator = ParserATNSimulator;
|
|
62925
64712
|
|
|
62926
|
-
},{"../Decorators":
|
|
64713
|
+
},{"../Decorators":267,"../IntStream":273,"../NoViableAltException":279,"../ParserRuleContext":283,"../Token":292,"../VocabularyImpl":298,"../dfa/AcceptStateInfo":364,"../dfa/DFAState":367,"../misc/Array2DHashSet":371,"../misc/Arrays":373,"../misc/BitSet":374,"../misc/IntegerList":377,"../misc/Interval":379,"../misc/ObjectEqualityComparator":383,"./ATN":300,"./ATNConfig":301,"./ATNConfigSet":302,"./ATNSimulator":305,"./ATNStateType":307,"./ActionTransition":309,"./AtomTransition":311,"./ConflictInfo":316,"./DecisionState":320,"./NotSetTransition":338,"./PredictionContext":347,"./PredictionContextCache":348,"./PredictionMode":349,"./RuleStopState":353,"./RuleTransition":354,"./SemanticContext":355,"./SetTransition":356,"./SimulatorState":357,"assert":410}],342:[function(require,module,exports){
|
|
62927
64714
|
"use strict";
|
|
62928
64715
|
/*!
|
|
62929
64716
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -62956,7 +64743,7 @@ __decorate([
|
|
|
62956
64743
|
], PlusBlockStartState.prototype, "stateType", null);
|
|
62957
64744
|
exports.PlusBlockStartState = PlusBlockStartState;
|
|
62958
64745
|
|
|
62959
|
-
},{"../Decorators":
|
|
64746
|
+
},{"../Decorators":267,"./ATNStateType":307,"./BlockStartState":315}],343:[function(require,module,exports){
|
|
62960
64747
|
"use strict";
|
|
62961
64748
|
/*!
|
|
62962
64749
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -62987,7 +64774,7 @@ __decorate([
|
|
|
62987
64774
|
], PlusLoopbackState.prototype, "stateType", null);
|
|
62988
64775
|
exports.PlusLoopbackState = PlusLoopbackState;
|
|
62989
64776
|
|
|
62990
|
-
},{"../Decorators":
|
|
64777
|
+
},{"../Decorators":267,"./ATNStateType":307,"./DecisionState":320}],344:[function(require,module,exports){
|
|
62991
64778
|
"use strict";
|
|
62992
64779
|
/*!
|
|
62993
64780
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -63050,7 +64837,7 @@ PrecedencePredicateTransition = __decorate([
|
|
|
63050
64837
|
], PrecedencePredicateTransition);
|
|
63051
64838
|
exports.PrecedencePredicateTransition = PrecedencePredicateTransition;
|
|
63052
64839
|
|
|
63053
|
-
},{"../Decorators":
|
|
64840
|
+
},{"../Decorators":267,"./AbstractPredicateTransition":308,"./SemanticContext":355}],345:[function(require,module,exports){
|
|
63054
64841
|
"use strict";
|
|
63055
64842
|
/*!
|
|
63056
64843
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -63113,7 +64900,7 @@ PredicateEvalInfo = __decorate([
|
|
|
63113
64900
|
], PredicateEvalInfo);
|
|
63114
64901
|
exports.PredicateEvalInfo = PredicateEvalInfo;
|
|
63115
64902
|
|
|
63116
|
-
},{"../Decorators":
|
|
64903
|
+
},{"../Decorators":267,"./DecisionEventInfo":318}],346:[function(require,module,exports){
|
|
63117
64904
|
"use strict";
|
|
63118
64905
|
/*!
|
|
63119
64906
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -63179,7 +64966,7 @@ PredicateTransition = __decorate([
|
|
|
63179
64966
|
], PredicateTransition);
|
|
63180
64967
|
exports.PredicateTransition = PredicateTransition;
|
|
63181
64968
|
|
|
63182
|
-
},{"../Decorators":
|
|
64969
|
+
},{"../Decorators":267,"./AbstractPredicateTransition":308,"./SemanticContext":355}],347:[function(require,module,exports){
|
|
63183
64970
|
"use strict";
|
|
63184
64971
|
/*!
|
|
63185
64972
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -63870,7 +65657,7 @@ exports.SingletonPredictionContext = SingletonPredictionContext;
|
|
|
63870
65657
|
PredictionContext.IdentityEqualityComparator = IdentityEqualityComparator;
|
|
63871
65658
|
})(PredictionContext = exports.PredictionContext || (exports.PredictionContext = {}));
|
|
63872
65659
|
|
|
63873
|
-
},{"../Decorators":
|
|
65660
|
+
},{"../Decorators":267,"../misc/Array2DHashMap":370,"../misc/Array2DHashSet":371,"../misc/Arrays":373,"../misc/MurmurHash":382,"./PredictionContextCache":348,"assert":410}],348:[function(require,module,exports){
|
|
63874
65661
|
"use strict";
|
|
63875
65662
|
/*!
|
|
63876
65663
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64011,7 +65798,7 @@ PredictionContextCache.UNCACHED = new PredictionContextCache(false);
|
|
|
64011
65798
|
PredictionContextCache.IdentityCommutativePredictionContextOperands = IdentityCommutativePredictionContextOperands;
|
|
64012
65799
|
})(PredictionContextCache = exports.PredictionContextCache || (exports.PredictionContextCache = {}));
|
|
64013
65800
|
|
|
64014
|
-
},{"../Decorators":
|
|
65801
|
+
},{"../Decorators":267,"../misc/Array2DHashMap":370,"../misc/ObjectEqualityComparator":383,"./PredictionContext":347,"assert":410}],349:[function(require,module,exports){
|
|
64015
65802
|
"use strict";
|
|
64016
65803
|
/*!
|
|
64017
65804
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64172,7 +65959,7 @@ var PredictionMode;
|
|
|
64172
65959
|
PredictionMode.allConfigsInRuleStopStates = allConfigsInRuleStopStates;
|
|
64173
65960
|
})(PredictionMode = exports.PredictionMode || (exports.PredictionMode = {}));
|
|
64174
65961
|
|
|
64175
|
-
},{"../Decorators":
|
|
65962
|
+
},{"../Decorators":267,"../misc/Array2DHashMap":370,"../misc/MurmurHash":382,"./RuleStopState":353}],350:[function(require,module,exports){
|
|
64176
65963
|
(function (process){(function (){
|
|
64177
65964
|
"use strict";
|
|
64178
65965
|
/*!
|
|
@@ -64441,7 +66228,7 @@ __decorate([
|
|
|
64441
66228
|
exports.ProfilingATNSimulator = ProfilingATNSimulator;
|
|
64442
66229
|
|
|
64443
66230
|
}).call(this)}).call(this,require('_process'))
|
|
64444
|
-
},{"../Decorators":
|
|
66231
|
+
},{"../Decorators":267,"./ATN":300,"./ATNSimulator":305,"./AmbiguityInfo":310,"./ContextSensitivityInfo":317,"./DecisionInfo":319,"./ErrorInfo":322,"./LookaheadEventInfo":336,"./ParserATNSimulator":341,"./PredicateEvalInfo":345,"./SemanticContext":355,"./SimulatorState":357,"_process":469}],351:[function(require,module,exports){
|
|
64445
66232
|
"use strict";
|
|
64446
66233
|
/*!
|
|
64447
66234
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64499,7 +66286,7 @@ RangeTransition = __decorate([
|
|
|
64499
66286
|
], RangeTransition);
|
|
64500
66287
|
exports.RangeTransition = RangeTransition;
|
|
64501
66288
|
|
|
64502
|
-
},{"../Decorators":
|
|
66289
|
+
},{"../Decorators":267,"../misc/IntervalSet":380,"./Transition":362}],352:[function(require,module,exports){
|
|
64503
66290
|
"use strict";
|
|
64504
66291
|
/*!
|
|
64505
66292
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64532,7 +66319,7 @@ __decorate([
|
|
|
64532
66319
|
], RuleStartState.prototype, "stateType", null);
|
|
64533
66320
|
exports.RuleStartState = RuleStartState;
|
|
64534
66321
|
|
|
64535
|
-
},{"../Decorators":
|
|
66322
|
+
},{"../Decorators":267,"./ATNState":306,"./ATNStateType":307}],353:[function(require,module,exports){
|
|
64536
66323
|
"use strict";
|
|
64537
66324
|
/*!
|
|
64538
66325
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64571,7 +66358,7 @@ __decorate([
|
|
|
64571
66358
|
], RuleStopState.prototype, "stateType", null);
|
|
64572
66359
|
exports.RuleStopState = RuleStopState;
|
|
64573
66360
|
|
|
64574
|
-
},{"../Decorators":
|
|
66361
|
+
},{"../Decorators":267,"./ATNState":306,"./ATNStateType":307}],354:[function(require,module,exports){
|
|
64575
66362
|
"use strict";
|
|
64576
66363
|
/*!
|
|
64577
66364
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -64627,7 +66414,7 @@ RuleTransition = __decorate([
|
|
|
64627
66414
|
], RuleTransition);
|
|
64628
66415
|
exports.RuleTransition = RuleTransition;
|
|
64629
66416
|
|
|
64630
|
-
},{"../Decorators":
|
|
66417
|
+
},{"../Decorators":267,"./Transition":362}],355:[function(require,module,exports){
|
|
64631
66418
|
"use strict";
|
|
64632
66419
|
/*!
|
|
64633
66420
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65107,7 +66894,7 @@ exports.SemanticContext = SemanticContext;
|
|
|
65107
66894
|
SemanticContext.OR = OR;
|
|
65108
66895
|
})(SemanticContext = exports.SemanticContext || (exports.SemanticContext = {}));
|
|
65109
66896
|
|
|
65110
|
-
},{"../Decorators":
|
|
66897
|
+
},{"../Decorators":267,"../misc/Array2DHashSet":371,"../misc/ArrayEqualityComparator":372,"../misc/MurmurHash":382,"../misc/ObjectEqualityComparator":383,"../misc/Utils":386}],356:[function(require,module,exports){
|
|
65111
66898
|
"use strict";
|
|
65112
66899
|
/*!
|
|
65113
66900
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65173,7 +66960,7 @@ SetTransition = __decorate([
|
|
|
65173
66960
|
], SetTransition);
|
|
65174
66961
|
exports.SetTransition = SetTransition;
|
|
65175
66962
|
|
|
65176
|
-
},{"../Decorators":
|
|
66963
|
+
},{"../Decorators":267,"../Token":292,"../misc/IntervalSet":380,"./Transition":362}],357:[function(require,module,exports){
|
|
65177
66964
|
"use strict";
|
|
65178
66965
|
/*!
|
|
65179
66966
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65209,7 +66996,7 @@ SimulatorState = __decorate([
|
|
|
65209
66996
|
], SimulatorState);
|
|
65210
66997
|
exports.SimulatorState = SimulatorState;
|
|
65211
66998
|
|
|
65212
|
-
},{"../Decorators":
|
|
66999
|
+
},{"../Decorators":267,"../ParserRuleContext":283}],358:[function(require,module,exports){
|
|
65213
67000
|
"use strict";
|
|
65214
67001
|
/*!
|
|
65215
67002
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65237,7 +67024,7 @@ __decorate([
|
|
|
65237
67024
|
], StarBlockStartState.prototype, "stateType", null);
|
|
65238
67025
|
exports.StarBlockStartState = StarBlockStartState;
|
|
65239
67026
|
|
|
65240
|
-
},{"../Decorators":
|
|
67027
|
+
},{"../Decorators":267,"./ATNStateType":307,"./BlockStartState":315}],359:[function(require,module,exports){
|
|
65241
67028
|
"use strict";
|
|
65242
67029
|
/*!
|
|
65243
67030
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65294,7 +67081,7 @@ __decorate([
|
|
|
65294
67081
|
], StarLoopEntryState.prototype, "stateType", null);
|
|
65295
67082
|
exports.StarLoopEntryState = StarLoopEntryState;
|
|
65296
67083
|
|
|
65297
|
-
},{"../Decorators":
|
|
67084
|
+
},{"../Decorators":267,"../misc/BitSet":374,"./ATNStateType":307,"./DecisionState":320}],360:[function(require,module,exports){
|
|
65298
67085
|
"use strict";
|
|
65299
67086
|
/*!
|
|
65300
67087
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65325,7 +67112,7 @@ __decorate([
|
|
|
65325
67112
|
], StarLoopbackState.prototype, "stateType", null);
|
|
65326
67113
|
exports.StarLoopbackState = StarLoopbackState;
|
|
65327
67114
|
|
|
65328
|
-
},{"../Decorators":
|
|
67115
|
+
},{"../Decorators":267,"./ATNState":306,"./ATNStateType":307}],361:[function(require,module,exports){
|
|
65329
67116
|
"use strict";
|
|
65330
67117
|
/*!
|
|
65331
67118
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65354,7 +67141,7 @@ __decorate([
|
|
|
65354
67141
|
], TokensStartState.prototype, "stateType", null);
|
|
65355
67142
|
exports.TokensStartState = TokensStartState;
|
|
65356
67143
|
|
|
65357
|
-
},{"../Decorators":
|
|
67144
|
+
},{"../Decorators":267,"./ATNStateType":307,"./DecisionState":320}],362:[function(require,module,exports){
|
|
65358
67145
|
"use strict";
|
|
65359
67146
|
/*!
|
|
65360
67147
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65428,7 +67215,7 @@ Transition = __decorate([
|
|
|
65428
67215
|
], Transition);
|
|
65429
67216
|
exports.Transition = Transition;
|
|
65430
67217
|
|
|
65431
|
-
},{"../Decorators":
|
|
67218
|
+
},{"../Decorators":267}],363:[function(require,module,exports){
|
|
65432
67219
|
"use strict";
|
|
65433
67220
|
/*!
|
|
65434
67221
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65476,7 +67263,7 @@ WildcardTransition = __decorate([
|
|
|
65476
67263
|
], WildcardTransition);
|
|
65477
67264
|
exports.WildcardTransition = WildcardTransition;
|
|
65478
67265
|
|
|
65479
|
-
},{"../Decorators":
|
|
67266
|
+
},{"../Decorators":267,"./Transition":362}],364:[function(require,module,exports){
|
|
65480
67267
|
"use strict";
|
|
65481
67268
|
/*!
|
|
65482
67269
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65518,7 +67305,7 @@ class AcceptStateInfo {
|
|
|
65518
67305
|
}
|
|
65519
67306
|
exports.AcceptStateInfo = AcceptStateInfo;
|
|
65520
67307
|
|
|
65521
|
-
},{}],
|
|
67308
|
+
},{}],365:[function(require,module,exports){
|
|
65522
67309
|
"use strict";
|
|
65523
67310
|
/*!
|
|
65524
67311
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65693,7 +67480,7 @@ DFA = __decorate([
|
|
|
65693
67480
|
], DFA);
|
|
65694
67481
|
exports.DFA = DFA;
|
|
65695
67482
|
|
|
65696
|
-
},{"../Decorators":
|
|
67483
|
+
},{"../Decorators":267,"../VocabularyImpl":298,"../atn/ATNConfigSet":302,"../atn/StarLoopEntryState":359,"../misc/Array2DHashSet":371,"../misc/ObjectEqualityComparator":383,"./DFASerializer":366,"./DFAState":367,"./LexerDFASerializer":368}],366:[function(require,module,exports){
|
|
65697
67484
|
"use strict";
|
|
65698
67485
|
/*!
|
|
65699
67486
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -65835,7 +67622,7 @@ __decorate([
|
|
|
65835
67622
|
], DFASerializer.prototype, "toString", null);
|
|
65836
67623
|
exports.DFASerializer = DFASerializer;
|
|
65837
67624
|
|
|
65838
|
-
},{"../Decorators":
|
|
67625
|
+
},{"../Decorators":267,"../Recognizer":287,"../VocabularyImpl":298,"../atn/ATNSimulator":305,"../atn/PredictionContext":347}],367:[function(require,module,exports){
|
|
65839
67626
|
"use strict";
|
|
65840
67627
|
/*!
|
|
65841
67628
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -66066,7 +67853,7 @@ exports.DFAState = DFAState;
|
|
|
66066
67853
|
DFAState.PredPrediction = PredPrediction;
|
|
66067
67854
|
})(DFAState = exports.DFAState || (exports.DFAState = {}));
|
|
66068
67855
|
|
|
66069
|
-
},{"../Decorators":
|
|
67856
|
+
},{"../Decorators":267,"../atn/ATN":300,"../atn/PredictionContext":347,"../misc/BitSet":374,"../misc/MurmurHash":382,"assert":410}],368:[function(require,module,exports){
|
|
66070
67857
|
"use strict";
|
|
66071
67858
|
/*!
|
|
66072
67859
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -66103,7 +67890,7 @@ LexerDFASerializer = __decorate([
|
|
|
66103
67890
|
], LexerDFASerializer);
|
|
66104
67891
|
exports.LexerDFASerializer = LexerDFASerializer;
|
|
66105
67892
|
|
|
66106
|
-
},{"../Decorators":
|
|
67893
|
+
},{"../Decorators":267,"../VocabularyImpl":298,"./DFASerializer":366}],369:[function(require,module,exports){
|
|
66107
67894
|
"use strict";
|
|
66108
67895
|
/*!
|
|
66109
67896
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -66169,7 +67956,7 @@ __exportStar(require("./Vocabulary"), exports);
|
|
|
66169
67956
|
__exportStar(require("./VocabularyImpl"), exports);
|
|
66170
67957
|
__exportStar(require("./WritableToken"), exports);
|
|
66171
67958
|
|
|
66172
|
-
},{"./ANTLRErrorListener":
|
|
67959
|
+
},{"./ANTLRErrorListener":254,"./ANTLRErrorStrategy":255,"./ANTLRInputStream":256,"./BailErrorStrategy":257,"./BufferedTokenStream":258,"./CharStream":259,"./CharStreams":260,"./CodePointBuffer":261,"./CodePointCharStream":262,"./CommonToken":263,"./CommonTokenFactory":264,"./CommonTokenStream":265,"./ConsoleErrorListener":266,"./DefaultErrorStrategy":268,"./Dependents":269,"./DiagnosticErrorListener":270,"./FailedPredicateException":271,"./InputMismatchException":272,"./IntStream":273,"./InterpreterRuleContext":274,"./Lexer":275,"./LexerInterpreter":276,"./LexerNoViableAltException":277,"./ListTokenSource":278,"./NoViableAltException":279,"./Parser":280,"./ParserErrorListener":281,"./ParserInterpreter":282,"./ParserRuleContext":283,"./ProxyErrorListener":284,"./ProxyParserErrorListener":285,"./RecognitionException":286,"./Recognizer":287,"./RuleContext":288,"./RuleContextWithAltNum":289,"./RuleDependency":290,"./RuleVersion":291,"./Token":292,"./TokenFactory":293,"./TokenSource":294,"./TokenStream":295,"./TokenStreamRewriter":296,"./Vocabulary":297,"./VocabularyImpl":298,"./WritableToken":299}],370:[function(require,module,exports){
|
|
66173
67960
|
"use strict";
|
|
66174
67961
|
/*!
|
|
66175
67962
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -66252,7 +68039,7 @@ class Array2DHashMap {
|
|
|
66252
68039
|
}
|
|
66253
68040
|
exports.Array2DHashMap = Array2DHashMap;
|
|
66254
68041
|
|
|
66255
|
-
},{"./Array2DHashSet":
|
|
68042
|
+
},{"./Array2DHashSet":371}],371:[function(require,module,exports){
|
|
66256
68043
|
"use strict";
|
|
66257
68044
|
/*!
|
|
66258
68045
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -66619,7 +68406,7 @@ __decorate([
|
|
|
66619
68406
|
], Array2DHashSet.prototype, "createBuckets", null);
|
|
66620
68407
|
exports.Array2DHashSet = Array2DHashSet;
|
|
66621
68408
|
|
|
66622
|
-
},{"../Decorators":
|
|
68409
|
+
},{"../Decorators":267,"./DefaultEqualityComparator":376,"./MurmurHash":382,"assert":410}],372:[function(require,module,exports){
|
|
66623
68410
|
"use strict";
|
|
66624
68411
|
/*!
|
|
66625
68412
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -66691,7 +68478,7 @@ __decorate([
|
|
|
66691
68478
|
], ArrayEqualityComparator.prototype, "equals", null);
|
|
66692
68479
|
exports.ArrayEqualityComparator = ArrayEqualityComparator;
|
|
66693
68480
|
|
|
66694
|
-
},{"../Decorators":
|
|
68481
|
+
},{"../Decorators":267,"./MurmurHash":382,"./ObjectEqualityComparator":383}],373:[function(require,module,exports){
|
|
66695
68482
|
"use strict";
|
|
66696
68483
|
/*!
|
|
66697
68484
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -66761,7 +68548,7 @@ var Arrays;
|
|
|
66761
68548
|
Arrays.toString = toString;
|
|
66762
68549
|
})(Arrays = exports.Arrays || (exports.Arrays = {}));
|
|
66763
68550
|
|
|
66764
|
-
},{}],
|
|
68551
|
+
},{}],374:[function(require,module,exports){
|
|
66765
68552
|
"use strict";
|
|
66766
68553
|
/*!
|
|
66767
68554
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -67433,7 +69220,7 @@ class BitSetIterator {
|
|
|
67433
69220
|
[Symbol.iterator]() { return this; }
|
|
67434
69221
|
}
|
|
67435
69222
|
|
|
67436
|
-
},{"./MurmurHash":
|
|
69223
|
+
},{"./MurmurHash":382,"util":475}],375:[function(require,module,exports){
|
|
67437
69224
|
"use strict";
|
|
67438
69225
|
/*!
|
|
67439
69226
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -67454,7 +69241,7 @@ function isSupplementaryCodePoint(ch) {
|
|
|
67454
69241
|
}
|
|
67455
69242
|
exports.isSupplementaryCodePoint = isSupplementaryCodePoint;
|
|
67456
69243
|
|
|
67457
|
-
},{}],
|
|
69244
|
+
},{}],376:[function(require,module,exports){
|
|
67458
69245
|
"use strict";
|
|
67459
69246
|
/*!
|
|
67460
69247
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -67525,7 +69312,7 @@ __decorate([
|
|
|
67525
69312
|
], DefaultEqualityComparator.prototype, "equals", null);
|
|
67526
69313
|
exports.DefaultEqualityComparator = DefaultEqualityComparator;
|
|
67527
69314
|
|
|
67528
|
-
},{"../Decorators":
|
|
69315
|
+
},{"../Decorators":267,"./MurmurHash":382,"./ObjectEqualityComparator":383}],377:[function(require,module,exports){
|
|
67529
69316
|
"use strict";
|
|
67530
69317
|
/*!
|
|
67531
69318
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -67819,7 +69606,7 @@ __decorate([
|
|
|
67819
69606
|
], IntegerList.prototype, "toString", null);
|
|
67820
69607
|
exports.IntegerList = IntegerList;
|
|
67821
69608
|
|
|
67822
|
-
},{"../Decorators":
|
|
69609
|
+
},{"../Decorators":267,"./Arrays":373}],378:[function(require,module,exports){
|
|
67823
69610
|
"use strict";
|
|
67824
69611
|
/*!
|
|
67825
69612
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -67849,7 +69636,7 @@ class IntegerStack extends IntegerList_1.IntegerList {
|
|
|
67849
69636
|
}
|
|
67850
69637
|
exports.IntegerStack = IntegerStack;
|
|
67851
69638
|
|
|
67852
|
-
},{"./IntegerList":
|
|
69639
|
+
},{"./IntegerList":377}],379:[function(require,module,exports){
|
|
67853
69640
|
"use strict";
|
|
67854
69641
|
/*!
|
|
67855
69642
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -67992,7 +69779,7 @@ __decorate([
|
|
|
67992
69779
|
], Interval.prototype, "toString", null);
|
|
67993
69780
|
exports.Interval = Interval;
|
|
67994
69781
|
|
|
67995
|
-
},{"../Decorators":
|
|
69782
|
+
},{"../Decorators":267}],380:[function(require,module,exports){
|
|
67996
69783
|
"use strict";
|
|
67997
69784
|
/*!
|
|
67998
69785
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -68638,7 +70425,7 @@ __decorate([
|
|
|
68638
70425
|
], IntervalSet, "subtract", null);
|
|
68639
70426
|
exports.IntervalSet = IntervalSet;
|
|
68640
70427
|
|
|
68641
|
-
},{"../Decorators":
|
|
70428
|
+
},{"../Decorators":267,"../Lexer":275,"../Token":292,"./ArrayEqualityComparator":372,"./IntegerList":377,"./Interval":379,"./MurmurHash":382}],381:[function(require,module,exports){
|
|
68642
70429
|
"use strict";
|
|
68643
70430
|
/*!
|
|
68644
70431
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -68671,7 +70458,7 @@ class MultiMap extends Map {
|
|
|
68671
70458
|
}
|
|
68672
70459
|
exports.MultiMap = MultiMap;
|
|
68673
70460
|
|
|
68674
|
-
},{}],
|
|
70461
|
+
},{}],382:[function(require,module,exports){
|
|
68675
70462
|
"use strict";
|
|
68676
70463
|
/*!
|
|
68677
70464
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -68786,7 +70573,7 @@ var MurmurHash;
|
|
|
68786
70573
|
}
|
|
68787
70574
|
})(MurmurHash = exports.MurmurHash || (exports.MurmurHash = {}));
|
|
68788
70575
|
|
|
68789
|
-
},{}],
|
|
70576
|
+
},{}],383:[function(require,module,exports){
|
|
68790
70577
|
"use strict";
|
|
68791
70578
|
/*!
|
|
68792
70579
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -68845,7 +70632,7 @@ __decorate([
|
|
|
68845
70632
|
], ObjectEqualityComparator.prototype, "equals", null);
|
|
68846
70633
|
exports.ObjectEqualityComparator = ObjectEqualityComparator;
|
|
68847
70634
|
|
|
68848
|
-
},{"../Decorators":
|
|
70635
|
+
},{"../Decorators":267}],384:[function(require,module,exports){
|
|
68849
70636
|
"use strict";
|
|
68850
70637
|
/*!
|
|
68851
70638
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -68874,7 +70661,7 @@ class ParseCancellationException extends Error {
|
|
|
68874
70661
|
}
|
|
68875
70662
|
exports.ParseCancellationException = ParseCancellationException;
|
|
68876
70663
|
|
|
68877
|
-
},{}],
|
|
70664
|
+
},{}],385:[function(require,module,exports){
|
|
68878
70665
|
"use strict";
|
|
68879
70666
|
/*!
|
|
68880
70667
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -68928,7 +70715,7 @@ class UUID {
|
|
|
68928
70715
|
}
|
|
68929
70716
|
exports.UUID = UUID;
|
|
68930
70717
|
|
|
68931
|
-
},{"./MurmurHash":
|
|
70718
|
+
},{"./MurmurHash":382}],386:[function(require,module,exports){
|
|
68932
70719
|
"use strict";
|
|
68933
70720
|
/*!
|
|
68934
70721
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -69103,7 +70890,7 @@ exports.toCharArray = toCharArray;
|
|
|
69103
70890
|
// return s;
|
|
69104
70891
|
// }
|
|
69105
70892
|
|
|
69106
|
-
},{}],
|
|
70893
|
+
},{}],387:[function(require,module,exports){
|
|
69107
70894
|
"use strict";
|
|
69108
70895
|
/*!
|
|
69109
70896
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -69139,7 +70926,7 @@ __decorate([
|
|
|
69139
70926
|
], ErrorNode.prototype, "accept", null);
|
|
69140
70927
|
exports.ErrorNode = ErrorNode;
|
|
69141
70928
|
|
|
69142
|
-
},{"../Decorators":
|
|
70929
|
+
},{"../Decorators":267,"./TerminalNode":390}],388:[function(require,module,exports){
|
|
69143
70930
|
"use strict";
|
|
69144
70931
|
/*!
|
|
69145
70932
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -69244,7 +71031,7 @@ exports.ParseTreeWalker = ParseTreeWalker;
|
|
|
69244
71031
|
ParseTreeWalker.DEFAULT = new ParseTreeWalker();
|
|
69245
71032
|
})(ParseTreeWalker = exports.ParseTreeWalker || (exports.ParseTreeWalker = {}));
|
|
69246
71033
|
|
|
69247
|
-
},{"./ErrorNode":
|
|
71034
|
+
},{"./ErrorNode":387,"./RuleNode":389,"./TerminalNode":390}],389:[function(require,module,exports){
|
|
69248
71035
|
"use strict";
|
|
69249
71036
|
/*!
|
|
69250
71037
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -69256,7 +71043,7 @@ class RuleNode {
|
|
|
69256
71043
|
}
|
|
69257
71044
|
exports.RuleNode = RuleNode;
|
|
69258
71045
|
|
|
69259
|
-
},{}],
|
|
71046
|
+
},{}],390:[function(require,module,exports){
|
|
69260
71047
|
"use strict";
|
|
69261
71048
|
/*!
|
|
69262
71049
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -69348,7 +71135,7 @@ __decorate([
|
|
|
69348
71135
|
], TerminalNode.prototype, "toString", null);
|
|
69349
71136
|
exports.TerminalNode = TerminalNode;
|
|
69350
71137
|
|
|
69351
|
-
},{"../Decorators":
|
|
71138
|
+
},{"../Decorators":267,"../Token":292,"../misc/Interval":379}],391:[function(require,module,exports){
|
|
69352
71139
|
"use strict";
|
|
69353
71140
|
/*!
|
|
69354
71141
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -69592,7 +71379,7 @@ __decorate([
|
|
|
69592
71379
|
], Trees, "getRootOfSubtreeEnclosingRegion", null);
|
|
69593
71380
|
exports.Trees = Trees;
|
|
69594
71381
|
|
|
69595
|
-
},{"../CommonToken":
|
|
71382
|
+
},{"../CommonToken":263,"../Decorators":267,"../Parser":280,"../ParserRuleContext":283,"../Token":292,"../atn/ATN":300,"../misc/Utils":386,"./ErrorNode":387,"./RuleNode":389,"./TerminalNode":390}],392:[function(require,module,exports){
|
|
69596
71383
|
"use strict";
|
|
69597
71384
|
/*!
|
|
69598
71385
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -69616,7 +71403,7 @@ class Chunk {
|
|
|
69616
71403
|
}
|
|
69617
71404
|
exports.Chunk = Chunk;
|
|
69618
71405
|
|
|
69619
|
-
},{}],
|
|
71406
|
+
},{}],393:[function(require,module,exports){
|
|
69620
71407
|
"use strict";
|
|
69621
71408
|
/*!
|
|
69622
71409
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -69796,7 +71583,7 @@ ParseTreeMatch = __decorate([
|
|
|
69796
71583
|
], ParseTreeMatch);
|
|
69797
71584
|
exports.ParseTreeMatch = ParseTreeMatch;
|
|
69798
71585
|
|
|
69799
|
-
},{"../../Decorators":
|
|
71586
|
+
},{"../../Decorators":267}],394:[function(require,module,exports){
|
|
69800
71587
|
"use strict";
|
|
69801
71588
|
/*!
|
|
69802
71589
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -69954,7 +71741,7 @@ ParseTreePattern = __decorate([
|
|
|
69954
71741
|
], ParseTreePattern);
|
|
69955
71742
|
exports.ParseTreePattern = ParseTreePattern;
|
|
69956
71743
|
|
|
69957
|
-
},{"../../Decorators":
|
|
71744
|
+
},{"../../Decorators":267,"../xpath/XPath":400}],395:[function(require,module,exports){
|
|
69958
71745
|
"use strict";
|
|
69959
71746
|
/*!
|
|
69960
71747
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -70432,7 +72219,7 @@ exports.ParseTreePatternMatcher = ParseTreePatternMatcher;
|
|
|
70432
72219
|
ParseTreePatternMatcher.StartRuleDoesNotConsumeFullPattern = StartRuleDoesNotConsumeFullPattern;
|
|
70433
72220
|
})(ParseTreePatternMatcher = exports.ParseTreePatternMatcher || (exports.ParseTreePatternMatcher = {}));
|
|
70434
72221
|
|
|
70435
|
-
},{"../../BailErrorStrategy":
|
|
72222
|
+
},{"../../BailErrorStrategy":257,"../../CharStreams":260,"../../CommonTokenStream":265,"../../Decorators":267,"../../ListTokenSource":278,"../../ParserInterpreter":282,"../../ParserRuleContext":283,"../../RecognitionException":286,"../../Token":292,"../../misc/MultiMap":381,"../../misc/ParseCancellationException":384,"../RuleNode":389,"../TerminalNode":390,"./ParseTreeMatch":393,"./ParseTreePattern":394,"./RuleTagToken":396,"./TagChunk":397,"./TextChunk":398,"./TokenTagToken":399}],396:[function(require,module,exports){
|
|
70436
72223
|
"use strict";
|
|
70437
72224
|
/*!
|
|
70438
72225
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -70630,7 +72417,7 @@ RuleTagToken = __decorate([
|
|
|
70630
72417
|
], RuleTagToken);
|
|
70631
72418
|
exports.RuleTagToken = RuleTagToken;
|
|
70632
72419
|
|
|
70633
|
-
},{"../../Decorators":
|
|
72420
|
+
},{"../../Decorators":267,"../../Token":292}],397:[function(require,module,exports){
|
|
70634
72421
|
"use strict";
|
|
70635
72422
|
/*!
|
|
70636
72423
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -70717,7 +72504,7 @@ __decorate([
|
|
|
70717
72504
|
], TagChunk.prototype, "toString", null);
|
|
70718
72505
|
exports.TagChunk = TagChunk;
|
|
70719
72506
|
|
|
70720
|
-
},{"../../Decorators":
|
|
72507
|
+
},{"../../Decorators":267,"./Chunk":392}],398:[function(require,module,exports){
|
|
70721
72508
|
"use strict";
|
|
70722
72509
|
/*!
|
|
70723
72510
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -70787,7 +72574,7 @@ TextChunk = __decorate([
|
|
|
70787
72574
|
], TextChunk);
|
|
70788
72575
|
exports.TextChunk = TextChunk;
|
|
70789
72576
|
|
|
70790
|
-
},{"../../Decorators":
|
|
72577
|
+
},{"../../Decorators":267,"./Chunk":392}],399:[function(require,module,exports){
|
|
70791
72578
|
"use strict";
|
|
70792
72579
|
/*!
|
|
70793
72580
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -70882,7 +72669,7 @@ TokenTagToken = __decorate([
|
|
|
70882
72669
|
], TokenTagToken);
|
|
70883
72670
|
exports.TokenTagToken = TokenTagToken;
|
|
70884
72671
|
|
|
70885
|
-
},{"../../CommonToken":
|
|
72672
|
+
},{"../../CommonToken":263,"../../Decorators":267}],400:[function(require,module,exports){
|
|
70886
72673
|
"use strict";
|
|
70887
72674
|
/*!
|
|
70888
72675
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -71079,7 +72866,7 @@ exports.XPath = XPath;
|
|
|
71079
72866
|
XPath.WILDCARD = "*"; // word not operator/separator
|
|
71080
72867
|
XPath.NOT = "!"; // word for invert operator
|
|
71081
72868
|
|
|
71082
|
-
},{"../../CharStreams":
|
|
72869
|
+
},{"../../CharStreams":260,"../../CommonTokenStream":265,"../../LexerNoViableAltException":277,"../../ParserRuleContext":283,"../../Token":292,"./XPathLexer":402,"./XPathLexerErrorListener":403,"./XPathRuleAnywhereElement":404,"./XPathRuleElement":405,"./XPathTokenAnywhereElement":406,"./XPathTokenElement":407,"./XPathWildcardAnywhereElement":408,"./XPathWildcardElement":409}],401:[function(require,module,exports){
|
|
71083
72870
|
"use strict";
|
|
71084
72871
|
/*!
|
|
71085
72872
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -71114,7 +72901,7 @@ __decorate([
|
|
|
71114
72901
|
], XPathElement.prototype, "toString", null);
|
|
71115
72902
|
exports.XPathElement = XPathElement;
|
|
71116
72903
|
|
|
71117
|
-
},{"../../Decorators":
|
|
72904
|
+
},{"../../Decorators":267}],402:[function(require,module,exports){
|
|
71118
72905
|
"use strict";
|
|
71119
72906
|
// Generated from XPathLexer.g4 by ANTLR 4.9.0-SNAPSHOT
|
|
71120
72907
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -71589,7 +73376,7 @@ XPathLexer._serializedATN = Utils.join([
|
|
|
71589
73376
|
XPathLexer._serializedATNSegment1,
|
|
71590
73377
|
], "");
|
|
71591
73378
|
|
|
71592
|
-
},{"../../Lexer":
|
|
73379
|
+
},{"../../Lexer":275,"../../VocabularyImpl":298,"../../atn/ATNDeserializer":304,"../../atn/LexerATNSimulator":325,"../../misc/Utils":386}],403:[function(require,module,exports){
|
|
71593
73380
|
"use strict";
|
|
71594
73381
|
/*!
|
|
71595
73382
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -71614,7 +73401,7 @@ __decorate([
|
|
|
71614
73401
|
], XPathLexerErrorListener.prototype, "syntaxError", null);
|
|
71615
73402
|
exports.XPathLexerErrorListener = XPathLexerErrorListener;
|
|
71616
73403
|
|
|
71617
|
-
},{"../../Decorators":
|
|
73404
|
+
},{"../../Decorators":267}],404:[function(require,module,exports){
|
|
71618
73405
|
"use strict";
|
|
71619
73406
|
/*!
|
|
71620
73407
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -71648,7 +73435,7 @@ __decorate([
|
|
|
71648
73435
|
], XPathRuleAnywhereElement.prototype, "evaluate", null);
|
|
71649
73436
|
exports.XPathRuleAnywhereElement = XPathRuleAnywhereElement;
|
|
71650
73437
|
|
|
71651
|
-
},{"../../Decorators":
|
|
73438
|
+
},{"../../Decorators":267,"../Trees":391,"./XPathElement":401}],405:[function(require,module,exports){
|
|
71652
73439
|
"use strict";
|
|
71653
73440
|
/*!
|
|
71654
73441
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -71691,7 +73478,7 @@ __decorate([
|
|
|
71691
73478
|
], XPathRuleElement.prototype, "evaluate", null);
|
|
71692
73479
|
exports.XPathRuleElement = XPathRuleElement;
|
|
71693
73480
|
|
|
71694
|
-
},{"../../Decorators":
|
|
73481
|
+
},{"../../Decorators":267,"../../ParserRuleContext":283,"../Trees":391,"./XPathElement":401}],406:[function(require,module,exports){
|
|
71695
73482
|
"use strict";
|
|
71696
73483
|
/*!
|
|
71697
73484
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -71723,7 +73510,7 @@ __decorate([
|
|
|
71723
73510
|
], XPathTokenAnywhereElement.prototype, "evaluate", null);
|
|
71724
73511
|
exports.XPathTokenAnywhereElement = XPathTokenAnywhereElement;
|
|
71725
73512
|
|
|
71726
|
-
},{"../../Decorators":
|
|
73513
|
+
},{"../../Decorators":267,"../Trees":391,"./XPathElement":401}],407:[function(require,module,exports){
|
|
71727
73514
|
"use strict";
|
|
71728
73515
|
/*!
|
|
71729
73516
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -71766,7 +73553,7 @@ __decorate([
|
|
|
71766
73553
|
], XPathTokenElement.prototype, "evaluate", null);
|
|
71767
73554
|
exports.XPathTokenElement = XPathTokenElement;
|
|
71768
73555
|
|
|
71769
|
-
},{"../../Decorators":
|
|
73556
|
+
},{"../../Decorators":267,"../TerminalNode":390,"../Trees":391,"./XPathElement":401}],408:[function(require,module,exports){
|
|
71770
73557
|
"use strict";
|
|
71771
73558
|
/*!
|
|
71772
73559
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -71802,7 +73589,7 @@ __decorate([
|
|
|
71802
73589
|
], XPathWildcardAnywhereElement.prototype, "evaluate", null);
|
|
71803
73590
|
exports.XPathWildcardAnywhereElement = XPathWildcardAnywhereElement;
|
|
71804
73591
|
|
|
71805
|
-
},{"../../Decorators":
|
|
73592
|
+
},{"../../Decorators":267,"../Trees":391,"./XPath":400,"./XPathElement":401}],409:[function(require,module,exports){
|
|
71806
73593
|
"use strict";
|
|
71807
73594
|
/*!
|
|
71808
73595
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -71842,7 +73629,7 @@ __decorate([
|
|
|
71842
73629
|
], XPathWildcardElement.prototype, "evaluate", null);
|
|
71843
73630
|
exports.XPathWildcardElement = XPathWildcardElement;
|
|
71844
73631
|
|
|
71845
|
-
},{"../../Decorators":
|
|
73632
|
+
},{"../../Decorators":267,"../Trees":391,"./XPath":400,"./XPathElement":401}],410:[function(require,module,exports){
|
|
71846
73633
|
(function (global){(function (){
|
|
71847
73634
|
'use strict';
|
|
71848
73635
|
|
|
@@ -72352,7 +74139,7 @@ var objectKeys = Object.keys || function (obj) {
|
|
|
72352
74139
|
};
|
|
72353
74140
|
|
|
72354
74141
|
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
72355
|
-
},{"object.assign/polyfill":
|
|
74142
|
+
},{"object.assign/polyfill":467,"util/":413}],411:[function(require,module,exports){
|
|
72356
74143
|
if (typeof Object.create === 'function') {
|
|
72357
74144
|
// implementation from standard node.js 'util' module
|
|
72358
74145
|
module.exports = function inherits(ctor, superCtor) {
|
|
@@ -72377,14 +74164,14 @@ if (typeof Object.create === 'function') {
|
|
|
72377
74164
|
}
|
|
72378
74165
|
}
|
|
72379
74166
|
|
|
72380
|
-
},{}],
|
|
74167
|
+
},{}],412:[function(require,module,exports){
|
|
72381
74168
|
module.exports = function isBuffer(arg) {
|
|
72382
74169
|
return arg && typeof arg === 'object'
|
|
72383
74170
|
&& typeof arg.copy === 'function'
|
|
72384
74171
|
&& typeof arg.fill === 'function'
|
|
72385
74172
|
&& typeof arg.readUInt8 === 'function';
|
|
72386
74173
|
}
|
|
72387
|
-
},{}],
|
|
74174
|
+
},{}],413:[function(require,module,exports){
|
|
72388
74175
|
(function (process,global){(function (){
|
|
72389
74176
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
72390
74177
|
//
|
|
@@ -72974,7 +74761,7 @@ function hasOwnProperty(obj, prop) {
|
|
|
72974
74761
|
}
|
|
72975
74762
|
|
|
72976
74763
|
}).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
72977
|
-
},{"./support/isBuffer":
|
|
74764
|
+
},{"./support/isBuffer":412,"_process":469,"inherits":411}],414:[function(require,module,exports){
|
|
72978
74765
|
(function (global){(function (){
|
|
72979
74766
|
'use strict';
|
|
72980
74767
|
|
|
@@ -72995,7 +74782,7 @@ module.exports = function availableTypedArrays() {
|
|
|
72995
74782
|
};
|
|
72996
74783
|
|
|
72997
74784
|
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
72998
|
-
},{"possible-typed-array-names":
|
|
74785
|
+
},{"possible-typed-array-names":468}],415:[function(require,module,exports){
|
|
72999
74786
|
(function (process,global){(function (){
|
|
73000
74787
|
module.exports = process.hrtime || hrtime
|
|
73001
74788
|
|
|
@@ -73026,7 +74813,7 @@ function hrtime(previousTimestamp){
|
|
|
73026
74813
|
return [seconds,nanoseconds]
|
|
73027
74814
|
}
|
|
73028
74815
|
}).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
73029
|
-
},{"_process":
|
|
74816
|
+
},{"_process":469}],416:[function(require,module,exports){
|
|
73030
74817
|
'use strict';
|
|
73031
74818
|
|
|
73032
74819
|
var bind = require('function-bind');
|
|
@@ -73038,7 +74825,7 @@ var $reflectApply = require('./reflectApply');
|
|
|
73038
74825
|
/** @type {import('./actualApply')} */
|
|
73039
74826
|
module.exports = $reflectApply || bind.call($call, $apply);
|
|
73040
74827
|
|
|
73041
|
-
},{"./functionApply":
|
|
74828
|
+
},{"./functionApply":418,"./functionCall":419,"./reflectApply":421,"function-bind":437}],417:[function(require,module,exports){
|
|
73042
74829
|
'use strict';
|
|
73043
74830
|
|
|
73044
74831
|
var bind = require('function-bind');
|
|
@@ -73050,19 +74837,19 @@ module.exports = function applyBind() {
|
|
|
73050
74837
|
return actualApply(bind, $apply, arguments);
|
|
73051
74838
|
};
|
|
73052
74839
|
|
|
73053
|
-
},{"./actualApply":
|
|
74840
|
+
},{"./actualApply":416,"./functionApply":418,"function-bind":437}],418:[function(require,module,exports){
|
|
73054
74841
|
'use strict';
|
|
73055
74842
|
|
|
73056
74843
|
/** @type {import('./functionApply')} */
|
|
73057
74844
|
module.exports = Function.prototype.apply;
|
|
73058
74845
|
|
|
73059
|
-
},{}],
|
|
74846
|
+
},{}],419:[function(require,module,exports){
|
|
73060
74847
|
'use strict';
|
|
73061
74848
|
|
|
73062
74849
|
/** @type {import('./functionCall')} */
|
|
73063
74850
|
module.exports = Function.prototype.call;
|
|
73064
74851
|
|
|
73065
|
-
},{}],
|
|
74852
|
+
},{}],420:[function(require,module,exports){
|
|
73066
74853
|
'use strict';
|
|
73067
74854
|
|
|
73068
74855
|
var bind = require('function-bind');
|
|
@@ -73079,13 +74866,13 @@ module.exports = function callBindBasic(args) {
|
|
|
73079
74866
|
return $actualApply(bind, $call, args);
|
|
73080
74867
|
};
|
|
73081
74868
|
|
|
73082
|
-
},{"./actualApply":
|
|
74869
|
+
},{"./actualApply":416,"./functionCall":419,"es-errors/type":432,"function-bind":437}],421:[function(require,module,exports){
|
|
73083
74870
|
'use strict';
|
|
73084
74871
|
|
|
73085
74872
|
/** @type {import('./reflectApply')} */
|
|
73086
74873
|
module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
73087
74874
|
|
|
73088
|
-
},{}],
|
|
74875
|
+
},{}],422:[function(require,module,exports){
|
|
73089
74876
|
'use strict';
|
|
73090
74877
|
|
|
73091
74878
|
var setFunctionLength = require('set-function-length');
|
|
@@ -73111,7 +74898,7 @@ if ($defineProperty) {
|
|
|
73111
74898
|
module.exports.apply = applyBind;
|
|
73112
74899
|
}
|
|
73113
74900
|
|
|
73114
|
-
},{"call-bind-apply-helpers":
|
|
74901
|
+
},{"call-bind-apply-helpers":420,"call-bind-apply-helpers/applyBind":417,"es-define-property":426,"set-function-length":471}],423:[function(require,module,exports){
|
|
73115
74902
|
'use strict';
|
|
73116
74903
|
|
|
73117
74904
|
var GetIntrinsic = require('get-intrinsic');
|
|
@@ -73132,7 +74919,7 @@ module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
|
73132
74919
|
return intrinsic;
|
|
73133
74920
|
};
|
|
73134
74921
|
|
|
73135
|
-
},{"call-bind-apply-helpers":
|
|
74922
|
+
},{"call-bind-apply-helpers":420,"get-intrinsic":438}],424:[function(require,module,exports){
|
|
73136
74923
|
'use strict';
|
|
73137
74924
|
|
|
73138
74925
|
var $defineProperty = require('es-define-property');
|
|
@@ -73190,7 +74977,7 @@ module.exports = function defineDataProperty(
|
|
|
73190
74977
|
}
|
|
73191
74978
|
};
|
|
73192
74979
|
|
|
73193
|
-
},{"es-define-property":
|
|
74980
|
+
},{"es-define-property":426,"es-errors/syntax":431,"es-errors/type":432,"gopd":443}],425:[function(require,module,exports){
|
|
73194
74981
|
'use strict';
|
|
73195
74982
|
|
|
73196
74983
|
var callBind = require('call-bind-apply-helpers');
|
|
@@ -73222,7 +75009,7 @@ module.exports = desc && typeof desc.get === 'function'
|
|
|
73222
75009
|
}
|
|
73223
75010
|
: false;
|
|
73224
75011
|
|
|
73225
|
-
},{"call-bind-apply-helpers":
|
|
75012
|
+
},{"call-bind-apply-helpers":420,"gopd":443}],426:[function(require,module,exports){
|
|
73226
75013
|
'use strict';
|
|
73227
75014
|
|
|
73228
75015
|
/** @type {import('.')} */
|
|
@@ -73238,55 +75025,55 @@ if ($defineProperty) {
|
|
|
73238
75025
|
|
|
73239
75026
|
module.exports = $defineProperty;
|
|
73240
75027
|
|
|
73241
|
-
},{}],
|
|
75028
|
+
},{}],427:[function(require,module,exports){
|
|
73242
75029
|
'use strict';
|
|
73243
75030
|
|
|
73244
75031
|
/** @type {import('./eval')} */
|
|
73245
75032
|
module.exports = EvalError;
|
|
73246
75033
|
|
|
73247
|
-
},{}],
|
|
75034
|
+
},{}],428:[function(require,module,exports){
|
|
73248
75035
|
'use strict';
|
|
73249
75036
|
|
|
73250
75037
|
/** @type {import('.')} */
|
|
73251
75038
|
module.exports = Error;
|
|
73252
75039
|
|
|
73253
|
-
},{}],
|
|
75040
|
+
},{}],429:[function(require,module,exports){
|
|
73254
75041
|
'use strict';
|
|
73255
75042
|
|
|
73256
75043
|
/** @type {import('./range')} */
|
|
73257
75044
|
module.exports = RangeError;
|
|
73258
75045
|
|
|
73259
|
-
},{}],
|
|
75046
|
+
},{}],430:[function(require,module,exports){
|
|
73260
75047
|
'use strict';
|
|
73261
75048
|
|
|
73262
75049
|
/** @type {import('./ref')} */
|
|
73263
75050
|
module.exports = ReferenceError;
|
|
73264
75051
|
|
|
73265
|
-
},{}],
|
|
75052
|
+
},{}],431:[function(require,module,exports){
|
|
73266
75053
|
'use strict';
|
|
73267
75054
|
|
|
73268
75055
|
/** @type {import('./syntax')} */
|
|
73269
75056
|
module.exports = SyntaxError;
|
|
73270
75057
|
|
|
73271
|
-
},{}],
|
|
75058
|
+
},{}],432:[function(require,module,exports){
|
|
73272
75059
|
'use strict';
|
|
73273
75060
|
|
|
73274
75061
|
/** @type {import('./type')} */
|
|
73275
75062
|
module.exports = TypeError;
|
|
73276
75063
|
|
|
73277
|
-
},{}],
|
|
75064
|
+
},{}],433:[function(require,module,exports){
|
|
73278
75065
|
'use strict';
|
|
73279
75066
|
|
|
73280
75067
|
/** @type {import('./uri')} */
|
|
73281
75068
|
module.exports = URIError;
|
|
73282
75069
|
|
|
73283
|
-
},{}],
|
|
75070
|
+
},{}],434:[function(require,module,exports){
|
|
73284
75071
|
'use strict';
|
|
73285
75072
|
|
|
73286
75073
|
/** @type {import('.')} */
|
|
73287
75074
|
module.exports = Object;
|
|
73288
75075
|
|
|
73289
|
-
},{}],
|
|
75076
|
+
},{}],435:[function(require,module,exports){
|
|
73290
75077
|
'use strict';
|
|
73291
75078
|
|
|
73292
75079
|
var isCallable = require('is-callable');
|
|
@@ -73357,7 +75144,7 @@ module.exports = function forEach(list, iterator, thisArg) {
|
|
|
73357
75144
|
}
|
|
73358
75145
|
};
|
|
73359
75146
|
|
|
73360
|
-
},{"is-callable":
|
|
75147
|
+
},{"is-callable":451}],436:[function(require,module,exports){
|
|
73361
75148
|
'use strict';
|
|
73362
75149
|
|
|
73363
75150
|
/* eslint no-invalid-this: 1 */
|
|
@@ -73443,14 +75230,14 @@ module.exports = function bind(that) {
|
|
|
73443
75230
|
return bound;
|
|
73444
75231
|
};
|
|
73445
75232
|
|
|
73446
|
-
},{}],
|
|
75233
|
+
},{}],437:[function(require,module,exports){
|
|
73447
75234
|
'use strict';
|
|
73448
75235
|
|
|
73449
75236
|
var implementation = require('./implementation');
|
|
73450
75237
|
|
|
73451
75238
|
module.exports = Function.prototype.bind || implementation;
|
|
73452
75239
|
|
|
73453
|
-
},{"./implementation":
|
|
75240
|
+
},{"./implementation":436}],438:[function(require,module,exports){
|
|
73454
75241
|
'use strict';
|
|
73455
75242
|
|
|
73456
75243
|
var undefined;
|
|
@@ -73830,7 +75617,7 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
|
|
73830
75617
|
return value;
|
|
73831
75618
|
};
|
|
73832
75619
|
|
|
73833
|
-
},{"call-bind-apply-helpers/functionApply":
|
|
75620
|
+
},{"call-bind-apply-helpers/functionApply":418,"call-bind-apply-helpers/functionCall":419,"es-define-property":426,"es-errors":428,"es-errors/eval":427,"es-errors/range":429,"es-errors/ref":430,"es-errors/syntax":431,"es-errors/type":432,"es-errors/uri":433,"es-object-atoms":434,"function-bind":437,"get-proto":441,"get-proto/Object.getPrototypeOf":439,"get-proto/Reflect.getPrototypeOf":440,"gopd":443,"has-symbols":445,"hasown":448,"math-intrinsics/abs":455,"math-intrinsics/floor":456,"math-intrinsics/max":458,"math-intrinsics/min":459,"math-intrinsics/pow":460,"math-intrinsics/round":461,"math-intrinsics/sign":462}],439:[function(require,module,exports){
|
|
73834
75621
|
'use strict';
|
|
73835
75622
|
|
|
73836
75623
|
var $Object = require('es-object-atoms');
|
|
@@ -73838,13 +75625,13 @@ var $Object = require('es-object-atoms');
|
|
|
73838
75625
|
/** @type {import('./Object.getPrototypeOf')} */
|
|
73839
75626
|
module.exports = $Object.getPrototypeOf || null;
|
|
73840
75627
|
|
|
73841
|
-
},{"es-object-atoms":
|
|
75628
|
+
},{"es-object-atoms":434}],440:[function(require,module,exports){
|
|
73842
75629
|
'use strict';
|
|
73843
75630
|
|
|
73844
75631
|
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
73845
75632
|
module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
|
|
73846
75633
|
|
|
73847
|
-
},{}],
|
|
75634
|
+
},{}],441:[function(require,module,exports){
|
|
73848
75635
|
'use strict';
|
|
73849
75636
|
|
|
73850
75637
|
var reflectGetProto = require('./Reflect.getPrototypeOf');
|
|
@@ -73873,13 +75660,13 @@ module.exports = reflectGetProto
|
|
|
73873
75660
|
}
|
|
73874
75661
|
: null;
|
|
73875
75662
|
|
|
73876
|
-
},{"./Object.getPrototypeOf":
|
|
75663
|
+
},{"./Object.getPrototypeOf":439,"./Reflect.getPrototypeOf":440,"dunder-proto/get":425}],442:[function(require,module,exports){
|
|
73877
75664
|
'use strict';
|
|
73878
75665
|
|
|
73879
75666
|
/** @type {import('./gOPD')} */
|
|
73880
75667
|
module.exports = Object.getOwnPropertyDescriptor;
|
|
73881
75668
|
|
|
73882
|
-
},{}],
|
|
75669
|
+
},{}],443:[function(require,module,exports){
|
|
73883
75670
|
'use strict';
|
|
73884
75671
|
|
|
73885
75672
|
/** @type {import('.')} */
|
|
@@ -73896,7 +75683,7 @@ if ($gOPD) {
|
|
|
73896
75683
|
|
|
73897
75684
|
module.exports = $gOPD;
|
|
73898
75685
|
|
|
73899
|
-
},{"./gOPD":
|
|
75686
|
+
},{"./gOPD":442}],444:[function(require,module,exports){
|
|
73900
75687
|
'use strict';
|
|
73901
75688
|
|
|
73902
75689
|
var $defineProperty = require('es-define-property');
|
|
@@ -73920,7 +75707,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
|
|
|
73920
75707
|
|
|
73921
75708
|
module.exports = hasPropertyDescriptors;
|
|
73922
75709
|
|
|
73923
|
-
},{"es-define-property":
|
|
75710
|
+
},{"es-define-property":426}],445:[function(require,module,exports){
|
|
73924
75711
|
'use strict';
|
|
73925
75712
|
|
|
73926
75713
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
@@ -73936,7 +75723,7 @@ module.exports = function hasNativeSymbols() {
|
|
|
73936
75723
|
return hasSymbolSham();
|
|
73937
75724
|
};
|
|
73938
75725
|
|
|
73939
|
-
},{"./shams":
|
|
75726
|
+
},{"./shams":446}],446:[function(require,module,exports){
|
|
73940
75727
|
'use strict';
|
|
73941
75728
|
|
|
73942
75729
|
/** @type {import('./shams')} */
|
|
@@ -73983,7 +75770,7 @@ module.exports = function hasSymbols() {
|
|
|
73983
75770
|
return true;
|
|
73984
75771
|
};
|
|
73985
75772
|
|
|
73986
|
-
},{}],
|
|
75773
|
+
},{}],447:[function(require,module,exports){
|
|
73987
75774
|
'use strict';
|
|
73988
75775
|
|
|
73989
75776
|
var hasSymbols = require('has-symbols/shams');
|
|
@@ -73993,7 +75780,7 @@ module.exports = function hasToStringTagShams() {
|
|
|
73993
75780
|
return hasSymbols() && !!Symbol.toStringTag;
|
|
73994
75781
|
};
|
|
73995
75782
|
|
|
73996
|
-
},{"has-symbols/shams":
|
|
75783
|
+
},{"has-symbols/shams":446}],448:[function(require,module,exports){
|
|
73997
75784
|
'use strict';
|
|
73998
75785
|
|
|
73999
75786
|
var call = Function.prototype.call;
|
|
@@ -74003,7 +75790,7 @@ var bind = require('function-bind');
|
|
|
74003
75790
|
/** @type {import('.')} */
|
|
74004
75791
|
module.exports = bind.call(call, $hasOwn);
|
|
74005
75792
|
|
|
74006
|
-
},{"function-bind":
|
|
75793
|
+
},{"function-bind":437}],449:[function(require,module,exports){
|
|
74007
75794
|
if (typeof Object.create === 'function') {
|
|
74008
75795
|
// implementation from standard node.js 'util' module
|
|
74009
75796
|
module.exports = function inherits(ctor, superCtor) {
|
|
@@ -74032,7 +75819,7 @@ if (typeof Object.create === 'function') {
|
|
|
74032
75819
|
}
|
|
74033
75820
|
}
|
|
74034
75821
|
|
|
74035
|
-
},{}],
|
|
75822
|
+
},{}],450:[function(require,module,exports){
|
|
74036
75823
|
'use strict';
|
|
74037
75824
|
|
|
74038
75825
|
var hasToStringTag = require('has-tostringtag/shams')();
|
|
@@ -74078,7 +75865,7 @@ isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
|
|
|
74078
75865
|
/** @type {import('.')} */
|
|
74079
75866
|
module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
|
|
74080
75867
|
|
|
74081
|
-
},{"call-bound":
|
|
75868
|
+
},{"call-bound":423,"has-tostringtag/shams":447}],451:[function(require,module,exports){
|
|
74082
75869
|
'use strict';
|
|
74083
75870
|
|
|
74084
75871
|
var fnToStr = Function.prototype.toString;
|
|
@@ -74181,7 +75968,7 @@ module.exports = reflectApply
|
|
|
74181
75968
|
return tryFunctionObject(value);
|
|
74182
75969
|
};
|
|
74183
75970
|
|
|
74184
|
-
},{}],
|
|
75971
|
+
},{}],452:[function(require,module,exports){
|
|
74185
75972
|
'use strict';
|
|
74186
75973
|
|
|
74187
75974
|
var callBound = require('call-bound');
|
|
@@ -74230,7 +76017,7 @@ module.exports = function isGeneratorFunction(fn) {
|
|
|
74230
76017
|
return getProto(fn) === GeneratorFunction;
|
|
74231
76018
|
};
|
|
74232
76019
|
|
|
74233
|
-
},{"call-bound":
|
|
76020
|
+
},{"call-bound":423,"get-proto":441,"has-tostringtag/shams":447,"safe-regex-test":470}],453:[function(require,module,exports){
|
|
74234
76021
|
'use strict';
|
|
74235
76022
|
|
|
74236
76023
|
var callBound = require('call-bound');
|
|
@@ -74301,7 +76088,7 @@ if (hasToStringTag) {
|
|
|
74301
76088
|
|
|
74302
76089
|
module.exports = fn;
|
|
74303
76090
|
|
|
74304
|
-
},{"call-bound":
|
|
76091
|
+
},{"call-bound":423,"gopd":443,"has-tostringtag/shams":447,"hasown":448}],454:[function(require,module,exports){
|
|
74305
76092
|
'use strict';
|
|
74306
76093
|
|
|
74307
76094
|
var whichTypedArray = require('which-typed-array');
|
|
@@ -74311,19 +76098,19 @@ module.exports = function isTypedArray(value) {
|
|
|
74311
76098
|
return !!whichTypedArray(value);
|
|
74312
76099
|
};
|
|
74313
76100
|
|
|
74314
|
-
},{"which-typed-array":
|
|
76101
|
+
},{"which-typed-array":476}],455:[function(require,module,exports){
|
|
74315
76102
|
'use strict';
|
|
74316
76103
|
|
|
74317
76104
|
/** @type {import('./abs')} */
|
|
74318
76105
|
module.exports = Math.abs;
|
|
74319
76106
|
|
|
74320
|
-
},{}],
|
|
76107
|
+
},{}],456:[function(require,module,exports){
|
|
74321
76108
|
'use strict';
|
|
74322
76109
|
|
|
74323
76110
|
/** @type {import('./floor')} */
|
|
74324
76111
|
module.exports = Math.floor;
|
|
74325
76112
|
|
|
74326
|
-
},{}],
|
|
76113
|
+
},{}],457:[function(require,module,exports){
|
|
74327
76114
|
'use strict';
|
|
74328
76115
|
|
|
74329
76116
|
/** @type {import('./isNaN')} */
|
|
@@ -74331,31 +76118,31 @@ module.exports = Number.isNaN || function isNaN(a) {
|
|
|
74331
76118
|
return a !== a;
|
|
74332
76119
|
};
|
|
74333
76120
|
|
|
74334
|
-
},{}],
|
|
76121
|
+
},{}],458:[function(require,module,exports){
|
|
74335
76122
|
'use strict';
|
|
74336
76123
|
|
|
74337
76124
|
/** @type {import('./max')} */
|
|
74338
76125
|
module.exports = Math.max;
|
|
74339
76126
|
|
|
74340
|
-
},{}],
|
|
76127
|
+
},{}],459:[function(require,module,exports){
|
|
74341
76128
|
'use strict';
|
|
74342
76129
|
|
|
74343
76130
|
/** @type {import('./min')} */
|
|
74344
76131
|
module.exports = Math.min;
|
|
74345
76132
|
|
|
74346
|
-
},{}],
|
|
76133
|
+
},{}],460:[function(require,module,exports){
|
|
74347
76134
|
'use strict';
|
|
74348
76135
|
|
|
74349
76136
|
/** @type {import('./pow')} */
|
|
74350
76137
|
module.exports = Math.pow;
|
|
74351
76138
|
|
|
74352
|
-
},{}],
|
|
76139
|
+
},{}],461:[function(require,module,exports){
|
|
74353
76140
|
'use strict';
|
|
74354
76141
|
|
|
74355
76142
|
/** @type {import('./round')} */
|
|
74356
76143
|
module.exports = Math.round;
|
|
74357
76144
|
|
|
74358
|
-
},{}],
|
|
76145
|
+
},{}],462:[function(require,module,exports){
|
|
74359
76146
|
'use strict';
|
|
74360
76147
|
|
|
74361
76148
|
var $isNaN = require('./isNaN');
|
|
@@ -74368,7 +76155,7 @@ module.exports = function sign(number) {
|
|
|
74368
76155
|
return number < 0 ? -1 : +1;
|
|
74369
76156
|
};
|
|
74370
76157
|
|
|
74371
|
-
},{"./isNaN":
|
|
76158
|
+
},{"./isNaN":457}],463:[function(require,module,exports){
|
|
74372
76159
|
'use strict';
|
|
74373
76160
|
|
|
74374
76161
|
var keysShim;
|
|
@@ -74492,7 +76279,7 @@ if (!Object.keys) {
|
|
|
74492
76279
|
}
|
|
74493
76280
|
module.exports = keysShim;
|
|
74494
76281
|
|
|
74495
|
-
},{"./isArguments":
|
|
76282
|
+
},{"./isArguments":465}],464:[function(require,module,exports){
|
|
74496
76283
|
'use strict';
|
|
74497
76284
|
|
|
74498
76285
|
var slice = Array.prototype.slice;
|
|
@@ -74526,7 +76313,7 @@ keysShim.shim = function shimObjectKeys() {
|
|
|
74526
76313
|
|
|
74527
76314
|
module.exports = keysShim;
|
|
74528
76315
|
|
|
74529
|
-
},{"./implementation":
|
|
76316
|
+
},{"./implementation":463,"./isArguments":465}],465:[function(require,module,exports){
|
|
74530
76317
|
'use strict';
|
|
74531
76318
|
|
|
74532
76319
|
var toStr = Object.prototype.toString;
|
|
@@ -74545,7 +76332,7 @@ module.exports = function isArguments(value) {
|
|
|
74545
76332
|
return isArgs;
|
|
74546
76333
|
};
|
|
74547
76334
|
|
|
74548
|
-
},{}],
|
|
76335
|
+
},{}],466:[function(require,module,exports){
|
|
74549
76336
|
'use strict';
|
|
74550
76337
|
|
|
74551
76338
|
// modified from https://github.com/es-shims/es6-shim
|
|
@@ -74593,7 +76380,7 @@ module.exports = function assign(target, source1) {
|
|
|
74593
76380
|
return to; // step 4
|
|
74594
76381
|
};
|
|
74595
76382
|
|
|
74596
|
-
},{"call-bound":
|
|
76383
|
+
},{"call-bound":423,"es-object-atoms":434,"has-symbols/shams":446,"object-keys":464}],467:[function(require,module,exports){
|
|
74597
76384
|
'use strict';
|
|
74598
76385
|
|
|
74599
76386
|
var implementation = require('./implementation');
|
|
@@ -74650,7 +76437,7 @@ module.exports = function getPolyfill() {
|
|
|
74650
76437
|
return Object.assign;
|
|
74651
76438
|
};
|
|
74652
76439
|
|
|
74653
|
-
},{"./implementation":
|
|
76440
|
+
},{"./implementation":466}],468:[function(require,module,exports){
|
|
74654
76441
|
'use strict';
|
|
74655
76442
|
|
|
74656
76443
|
/** @type {import('.')} */
|
|
@@ -74669,7 +76456,7 @@ module.exports = [
|
|
|
74669
76456
|
'BigUint64Array'
|
|
74670
76457
|
];
|
|
74671
76458
|
|
|
74672
|
-
},{}],
|
|
76459
|
+
},{}],469:[function(require,module,exports){
|
|
74673
76460
|
// shim for using process in browser
|
|
74674
76461
|
var process = module.exports = {};
|
|
74675
76462
|
|
|
@@ -74855,7 +76642,7 @@ process.chdir = function (dir) {
|
|
|
74855
76642
|
};
|
|
74856
76643
|
process.umask = function() { return 0; };
|
|
74857
76644
|
|
|
74858
|
-
},{}],
|
|
76645
|
+
},{}],470:[function(require,module,exports){
|
|
74859
76646
|
'use strict';
|
|
74860
76647
|
|
|
74861
76648
|
var callBound = require('call-bound');
|
|
@@ -74874,7 +76661,7 @@ module.exports = function regexTester(regex) {
|
|
|
74874
76661
|
};
|
|
74875
76662
|
};
|
|
74876
76663
|
|
|
74877
|
-
},{"call-bound":
|
|
76664
|
+
},{"call-bound":423,"es-errors/type":432,"is-regex":453}],471:[function(require,module,exports){
|
|
74878
76665
|
'use strict';
|
|
74879
76666
|
|
|
74880
76667
|
var GetIntrinsic = require('get-intrinsic');
|
|
@@ -74918,7 +76705,7 @@ module.exports = function setFunctionLength(fn, length) {
|
|
|
74918
76705
|
return fn;
|
|
74919
76706
|
};
|
|
74920
76707
|
|
|
74921
|
-
},{"define-data-property":
|
|
76708
|
+
},{"define-data-property":424,"es-errors/type":432,"get-intrinsic":438,"gopd":443,"has-property-descriptors":444}],472:[function(require,module,exports){
|
|
74922
76709
|
(function (setImmediate,clearImmediate){(function (){
|
|
74923
76710
|
var nextTick = require('process/browser.js').nextTick;
|
|
74924
76711
|
var apply = Function.prototype.apply;
|
|
@@ -74997,9 +76784,9 @@ exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate :
|
|
|
74997
76784
|
delete immediateIds[id];
|
|
74998
76785
|
};
|
|
74999
76786
|
}).call(this)}).call(this,require("timers").setImmediate,require("timers").clearImmediate)
|
|
75000
|
-
},{"process/browser.js":
|
|
75001
|
-
arguments[4][
|
|
75002
|
-
},{"dup":
|
|
76787
|
+
},{"process/browser.js":469,"timers":472}],473:[function(require,module,exports){
|
|
76788
|
+
arguments[4][412][0].apply(exports,arguments)
|
|
76789
|
+
},{"dup":412}],474:[function(require,module,exports){
|
|
75003
76790
|
// Currently in sync with Node.js lib/internal/util/types.js
|
|
75004
76791
|
// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9
|
|
75005
76792
|
|
|
@@ -75335,7 +77122,7 @@ exports.isAnyArrayBuffer = isAnyArrayBuffer;
|
|
|
75335
77122
|
});
|
|
75336
77123
|
});
|
|
75337
77124
|
|
|
75338
|
-
},{"is-arguments":
|
|
77125
|
+
},{"is-arguments":450,"is-generator-function":452,"is-typed-array":454,"which-typed-array":476}],475:[function(require,module,exports){
|
|
75339
77126
|
(function (process){(function (){
|
|
75340
77127
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
75341
77128
|
//
|
|
@@ -76054,7 +77841,7 @@ function callbackify(original) {
|
|
|
76054
77841
|
exports.callbackify = callbackify;
|
|
76055
77842
|
|
|
76056
77843
|
}).call(this)}).call(this,require('_process'))
|
|
76057
|
-
},{"./support/isBuffer":
|
|
77844
|
+
},{"./support/isBuffer":473,"./support/types":474,"_process":469,"inherits":449}],476:[function(require,module,exports){
|
|
76058
77845
|
(function (global){(function (){
|
|
76059
77846
|
'use strict';
|
|
76060
77847
|
|
|
@@ -76175,5 +77962,5 @@ module.exports = function whichTypedArray(value) {
|
|
|
76175
77962
|
};
|
|
76176
77963
|
|
|
76177
77964
|
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
76178
|
-
},{"available-typed-arrays":
|
|
77965
|
+
},{"available-typed-arrays":414,"call-bind":422,"call-bound":423,"for-each":435,"get-proto":441,"gopd":443,"has-tostringtag/shams":447}]},{},[136])(136)
|
|
76179
77966
|
});
|