@designliquido/delegua 0.15.16 → 0.16.1
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/bin/package.json +1 -1
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-mapler.d.ts +60 -0
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-mapler.js +486 -0
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-mapler.js.map +1 -0
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-visualg.js +27 -3
- package/fontes/avaliador-sintatico/dialetos/avaliador-sintatico-visualg.js.map +1 -1
- package/fontes/avaliador-sintatico/dialetos/index.d.ts +1 -0
- package/fontes/avaliador-sintatico/dialetos/index.js +1 -0
- package/fontes/avaliador-sintatico/dialetos/index.js.map +1 -1
- package/fontes/interpretador/dialetos/index.d.ts +2 -0
- package/fontes/interpretador/dialetos/index.js +2 -0
- package/fontes/interpretador/dialetos/index.js.map +1 -1
- package/fontes/interpretador/dialetos/mapler/comum.d.ts +10 -0
- package/fontes/interpretador/dialetos/mapler/comum.js +143 -0
- package/fontes/interpretador/dialetos/mapler/comum.js.map +1 -0
- package/fontes/interpretador/dialetos/mapler/interpretador-mapler-com-depuracao.d.ts +47 -0
- package/fontes/interpretador/dialetos/mapler/interpretador-mapler-com-depuracao.js +152 -0
- package/fontes/interpretador/dialetos/mapler/interpretador-mapler-com-depuracao.js.map +1 -0
- package/fontes/interpretador/dialetos/mapler/interpretador-mapler.d.ts +43 -0
- package/fontes/interpretador/dialetos/mapler/interpretador-mapler.js +127 -0
- package/fontes/interpretador/dialetos/mapler/interpretador-mapler.js.map +1 -0
- package/fontes/lexador/dialetos/index.d.ts +1 -0
- package/fontes/lexador/dialetos/index.js +1 -0
- package/fontes/lexador/dialetos/index.js.map +1 -1
- package/fontes/lexador/dialetos/lexador-mapler.d.ts +9 -0
- package/fontes/lexador/dialetos/lexador-mapler.js +205 -0
- package/fontes/lexador/dialetos/lexador-mapler.js.map +1 -0
- package/fontes/lexador/dialetos/palavras-reservadas/mapler.d.ts +31 -0
- package/fontes/lexador/dialetos/palavras-reservadas/mapler.js +37 -0
- package/fontes/lexador/dialetos/palavras-reservadas/mapler.js.map +1 -0
- package/fontes/lexador/palavras-reservadas.d.ts +4 -4
- package/fontes/lexador/palavras-reservadas.js +4 -4
- package/fontes/lexador/palavras-reservadas.js.map +1 -1
- package/fontes/tipos-de-simbolos/delegua.d.ts +3 -3
- package/fontes/tipos-de-simbolos/delegua.js +3 -3
- package/fontes/tipos-de-simbolos/delegua.js.map +1 -1
- package/fontes/tipos-de-simbolos/mapler.d.ts +55 -0
- package/fontes/tipos-de-simbolos/mapler.js +57 -0
- package/fontes/tipos-de-simbolos/mapler.js.map +1 -0
- package/fontes/tradutores/tradutor-visualg.d.ts +3 -0
- package/fontes/tradutores/tradutor-visualg.js +39 -46
- package/fontes/tradutores/tradutor-visualg.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.InterpretadorMapler = void 0;
|
|
27
|
+
const __1 = require("../..");
|
|
28
|
+
const quebras_1 = require("../../../quebras");
|
|
29
|
+
const comum = __importStar(require("./comum"));
|
|
30
|
+
class InterpretadorMapler extends __1.InterpretadorBase {
|
|
31
|
+
constructor(diretorioBase, performance = false, funcaoDeRetorno = null, funcaoDeRetornoMesmaLinha = null) {
|
|
32
|
+
super(diretorioBase, performance, funcaoDeRetorno, funcaoDeRetornoMesmaLinha);
|
|
33
|
+
this.mensagemPrompt = '> ';
|
|
34
|
+
}
|
|
35
|
+
async avaliarArgumentosEscrevaMapler(argumentos) {
|
|
36
|
+
let formatoTexto = '';
|
|
37
|
+
for (const argumento of argumentos) {
|
|
38
|
+
const resultadoAvaliacao = await this.avaliar(argumento);
|
|
39
|
+
let valor = (resultadoAvaliacao === null || resultadoAvaliacao === void 0 ? void 0 : resultadoAvaliacao.hasOwnProperty('valor')) ? resultadoAvaliacao.valor : resultadoAvaliacao;
|
|
40
|
+
formatoTexto += `${this.paraTexto(valor)}`;
|
|
41
|
+
}
|
|
42
|
+
return formatoTexto;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* No Mapler, o bloco de condição executa se falso.
|
|
46
|
+
* Por isso a reimplementação aqui.
|
|
47
|
+
* @param declaracao A declaração `Fazer`
|
|
48
|
+
* @returns Só retorna em caso de erro na execução, e neste caso, o erro.
|
|
49
|
+
*/
|
|
50
|
+
async visitarDeclaracaoFazer(declaracao) {
|
|
51
|
+
let retornoExecucao;
|
|
52
|
+
do {
|
|
53
|
+
try {
|
|
54
|
+
retornoExecucao = await this.executar(declaracao.caminhoFazer);
|
|
55
|
+
if (retornoExecucao instanceof quebras_1.ContinuarQuebra) {
|
|
56
|
+
retornoExecucao = null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch (erro) {
|
|
60
|
+
return Promise.reject(erro);
|
|
61
|
+
}
|
|
62
|
+
} while (!(retornoExecucao instanceof quebras_1.Quebra) &&
|
|
63
|
+
!this.eVerdadeiro(await this.avaliar(declaracao.condicaoEnquanto)));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Execução de uma escrita na saída padrão, sem quebras de linha.
|
|
67
|
+
* Implementada para alguns dialetos, como Mapler.
|
|
68
|
+
*
|
|
69
|
+
* Como `readline.question` sobrescreve o que foi escrito antes, aqui
|
|
70
|
+
* definimos `this.mensagemPrompt` para uso com `leia`.
|
|
71
|
+
* No Mapler é muito comum usar `escreva()` seguido de `leia()` para
|
|
72
|
+
* gerar um prompt na mesma linha.
|
|
73
|
+
* @param declaracao A declaração.
|
|
74
|
+
* @returns Sempre nulo, por convenção de visita.
|
|
75
|
+
*/
|
|
76
|
+
async visitarExpressaoEscrevaMesmaLinha(declaracao) {
|
|
77
|
+
try {
|
|
78
|
+
const formatoTexto = await this.avaliarArgumentosEscrevaMapler(declaracao.argumentos);
|
|
79
|
+
this.mensagemPrompt = formatoTexto;
|
|
80
|
+
this.funcaoDeRetornoMesmaLinha(formatoTexto);
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
catch (erro) {
|
|
84
|
+
this.erros.push(erro);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Execução de uma escrita na saída configurada, que pode ser `console` (padrão) ou
|
|
89
|
+
* alguma função para escrever numa página Web.
|
|
90
|
+
* @param declaracao A declaração.
|
|
91
|
+
* @returns Sempre nulo, por convenção de visita.
|
|
92
|
+
*/
|
|
93
|
+
async visitarDeclaracaoEscreva(declaracao) {
|
|
94
|
+
try {
|
|
95
|
+
const formatoTexto = await this.avaliarArgumentosEscrevaMapler(declaracao.argumentos);
|
|
96
|
+
this.funcaoDeRetorno(formatoTexto);
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
catch (erro) {
|
|
100
|
+
this.erros.push(erro);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Execução da leitura de valores da entrada configurada no
|
|
105
|
+
* início da aplicação.
|
|
106
|
+
* @param expressao Expressão do tipo Leia
|
|
107
|
+
* @returns Promise com o resultado da leitura.
|
|
108
|
+
*/
|
|
109
|
+
async visitarExpressaoLeia(expressao) {
|
|
110
|
+
for (let argumento of expressao.argumentos) {
|
|
111
|
+
const promessaLeitura = () => new Promise((resolucao) => this.interfaceEntradaSaida.question(this.mensagemPrompt, (resposta) => {
|
|
112
|
+
this.mensagemPrompt = '> ';
|
|
113
|
+
resolucao(resposta);
|
|
114
|
+
}));
|
|
115
|
+
const valorLido = await promessaLeitura();
|
|
116
|
+
this.pilhaEscoposExecucao.atribuirVariavel(argumento.simbolo, valorLido);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
async visitarExpressaoBinaria(expressao) {
|
|
120
|
+
return comum.visitarExpressaoBinaria(this, expressao);
|
|
121
|
+
}
|
|
122
|
+
async visitarExpressaoLogica(expressao) {
|
|
123
|
+
return comum.visitarExpressaoLogica(this, expressao);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
exports.InterpretadorMapler = InterpretadorMapler;
|
|
127
|
+
//# sourceMappingURL=interpretador-mapler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpretador-mapler.js","sourceRoot":"","sources":["../../../../../fontes/interpretador/dialetos/mapler/interpretador-mapler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,6BAA0C;AAC1C,8CAA2D;AAE3D,+CAAiC;AAEjC,MAAa,mBAAoB,SAAQ,qBAAiB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AAC;SACxF;IACL,CAAC;IAED,KAAK,CAAC,uBAAuB,CAAC,SAAwB;QAClD,OAAO,KAAK,CAAC,uBAAuB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,SAAiB;QAC1C,OAAO,KAAK,CAAC,sBAAsB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACzD,CAAC;CACJ;AAlHD,kDAkHC"}
|
|
@@ -2,6 +2,7 @@ export * from './lexador-birl';
|
|
|
2
2
|
export * from './lexador-egua-classico';
|
|
3
3
|
export * from './lexador-eguap';
|
|
4
4
|
export * from './lexador-guarani';
|
|
5
|
+
export * from './lexador-mapler';
|
|
5
6
|
export * from './lexador-portugol-ipt';
|
|
6
7
|
export * from './lexador-portugol-studio';
|
|
7
8
|
export * from './lexador-visualg';
|
|
@@ -18,6 +18,7 @@ __exportStar(require("./lexador-birl"), exports);
|
|
|
18
18
|
__exportStar(require("./lexador-egua-classico"), exports);
|
|
19
19
|
__exportStar(require("./lexador-eguap"), exports);
|
|
20
20
|
__exportStar(require("./lexador-guarani"), exports);
|
|
21
|
+
__exportStar(require("./lexador-mapler"), exports);
|
|
21
22
|
__exportStar(require("./lexador-portugol-ipt"), exports);
|
|
22
23
|
__exportStar(require("./lexador-portugol-studio"), exports);
|
|
23
24
|
__exportStar(require("./lexador-visualg"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../fontes/lexador/dialetos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,0DAAwC;AACxC,kDAAgC;AAChC,oDAAkC;AAClC,yDAAuC;AACvC,4DAA0C;AAC1C,oDAAkC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../fontes/lexador/dialetos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,0DAAwC;AACxC,kDAAgC;AAChC,oDAAkC;AAClC,mDAAiC;AACjC,yDAAuC;AACvC,4DAA0C;AAC1C,oDAAkC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RetornoLexador } from '../../interfaces/retornos';
|
|
2
|
+
import { LexadorBaseLinhaUnica } from '../lexador-base-linha-unica';
|
|
3
|
+
export declare class LexadorMapler extends LexadorBaseLinhaUnica {
|
|
4
|
+
analisarNumero(): void;
|
|
5
|
+
analisarTexto(delimitador: string): void;
|
|
6
|
+
identificarPalavraChave(): void;
|
|
7
|
+
analisarToken(): void;
|
|
8
|
+
mapear(codigo: string[], hashArquivo: number): RetornoLexador;
|
|
9
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LexadorMapler = void 0;
|
|
7
|
+
const lexador_base_linha_unica_1 = require("../lexador-base-linha-unica");
|
|
8
|
+
const mapler_1 = __importDefault(require("../../tipos-de-simbolos/mapler"));
|
|
9
|
+
const mapler_2 = __importDefault(require("./palavras-reservadas/mapler"));
|
|
10
|
+
class LexadorMapler extends lexador_base_linha_unica_1.LexadorBaseLinhaUnica {
|
|
11
|
+
analisarNumero() {
|
|
12
|
+
while (this.eDigito(this.simboloAtual())) {
|
|
13
|
+
this.avancar();
|
|
14
|
+
}
|
|
15
|
+
if (this.simboloAtual() == '.' && this.eDigito(this.proximoSimbolo())) {
|
|
16
|
+
this.avancar();
|
|
17
|
+
while (this.eDigito(this.simboloAtual())) {
|
|
18
|
+
this.avancar();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const numeroCompleto = this.codigo.substring(this.inicioSimbolo, this.atual);
|
|
22
|
+
this.adicionarSimbolo(mapler_1.default.NUMERO, parseFloat(numeroCompleto));
|
|
23
|
+
}
|
|
24
|
+
analisarTexto(delimitador) {
|
|
25
|
+
while (this.simboloAtual() !== delimitador && !this.eFinalDoCodigo()) {
|
|
26
|
+
this.avancar();
|
|
27
|
+
}
|
|
28
|
+
if (this.eFinalDoCodigo()) {
|
|
29
|
+
this.erros.push({
|
|
30
|
+
linha: this.linha + 1,
|
|
31
|
+
caractere: this.simboloAnterior(),
|
|
32
|
+
mensagem: 'Caractere não finalizado.',
|
|
33
|
+
});
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const valor = this.codigo.substring(this.inicioSimbolo + 1, this.atual);
|
|
37
|
+
this.adicionarSimbolo(mapler_1.default.CARACTERE, valor);
|
|
38
|
+
}
|
|
39
|
+
identificarPalavraChave() {
|
|
40
|
+
while (this.eAlfabetoOuDigito(this.simboloAtual())) {
|
|
41
|
+
this.avancar();
|
|
42
|
+
}
|
|
43
|
+
const codigo = this.codigo.substring(this.inicioSimbolo, this.atual).toLowerCase();
|
|
44
|
+
if (codigo in mapler_2.default) {
|
|
45
|
+
this.adicionarSimbolo(mapler_2.default[codigo], codigo);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.adicionarSimbolo(mapler_1.default.IDENTIFICADOR, codigo);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
analisarToken() {
|
|
52
|
+
const caractere = this.simboloAtual();
|
|
53
|
+
switch (caractere) {
|
|
54
|
+
case '(':
|
|
55
|
+
this.adicionarSimbolo(mapler_1.default.PARENTESE_ESQUERDO);
|
|
56
|
+
this.avancar();
|
|
57
|
+
break;
|
|
58
|
+
case ')':
|
|
59
|
+
this.adicionarSimbolo(mapler_1.default.PARENTESE_DIREITO);
|
|
60
|
+
this.avancar();
|
|
61
|
+
break;
|
|
62
|
+
case '[':
|
|
63
|
+
this.adicionarSimbolo(mapler_1.default.COLCHETE_ESQUERDO);
|
|
64
|
+
this.avancar();
|
|
65
|
+
break;
|
|
66
|
+
case ']':
|
|
67
|
+
this.adicionarSimbolo(mapler_1.default.COLCHETE_DIREITO);
|
|
68
|
+
this.avancar();
|
|
69
|
+
break;
|
|
70
|
+
case ':':
|
|
71
|
+
this.adicionarSimbolo(mapler_1.default.DOIS_PONTOS);
|
|
72
|
+
this.avancar();
|
|
73
|
+
break;
|
|
74
|
+
case '<':
|
|
75
|
+
this.avancar();
|
|
76
|
+
switch (this.simboloAtual()) {
|
|
77
|
+
case '-':
|
|
78
|
+
this.adicionarSimbolo(mapler_1.default.SETA_ATRIBUICAO);
|
|
79
|
+
this.avancar();
|
|
80
|
+
break;
|
|
81
|
+
case '=':
|
|
82
|
+
this.adicionarSimbolo(mapler_1.default.MENOR_IGUAL);
|
|
83
|
+
this.avancar();
|
|
84
|
+
break;
|
|
85
|
+
case '>':
|
|
86
|
+
this.adicionarSimbolo(mapler_1.default.DIFERENTE);
|
|
87
|
+
this.avancar();
|
|
88
|
+
break;
|
|
89
|
+
default:
|
|
90
|
+
this.adicionarSimbolo(mapler_1.default.MENOR);
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
break;
|
|
94
|
+
case '>':
|
|
95
|
+
this.avancar();
|
|
96
|
+
if (this.simboloAtual() === '=') {
|
|
97
|
+
this.adicionarSimbolo(mapler_1.default.MAIOR_IGUAL);
|
|
98
|
+
this.avancar();
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
this.adicionarSimbolo(mapler_1.default.MAIOR);
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
case '=':
|
|
105
|
+
this.adicionarSimbolo(mapler_1.default.IGUAL);
|
|
106
|
+
this.avancar();
|
|
107
|
+
break;
|
|
108
|
+
case ',':
|
|
109
|
+
this.adicionarSimbolo(mapler_1.default.VIRGULA);
|
|
110
|
+
this.avancar();
|
|
111
|
+
break;
|
|
112
|
+
case ';':
|
|
113
|
+
this.adicionarSimbolo(mapler_1.default.PONTO_VIRGULA);
|
|
114
|
+
this.avancar();
|
|
115
|
+
break;
|
|
116
|
+
case '.':
|
|
117
|
+
this.adicionarSimbolo(mapler_1.default.PONTO);
|
|
118
|
+
this.avancar();
|
|
119
|
+
break;
|
|
120
|
+
case '-':
|
|
121
|
+
this.adicionarSimbolo(mapler_1.default.SUBTRACAO);
|
|
122
|
+
this.avancar();
|
|
123
|
+
break;
|
|
124
|
+
case '+':
|
|
125
|
+
this.adicionarSimbolo(mapler_1.default.ADICAO);
|
|
126
|
+
this.avancar();
|
|
127
|
+
break;
|
|
128
|
+
// case '%':
|
|
129
|
+
// this.adicionarSimbolo(tiposDeSimbolos.MODULO);
|
|
130
|
+
// this.avancar();
|
|
131
|
+
// break;
|
|
132
|
+
case '*':
|
|
133
|
+
this.adicionarSimbolo(mapler_1.default.MULTIPLICACAO);
|
|
134
|
+
this.avancar();
|
|
135
|
+
break;
|
|
136
|
+
case '/':
|
|
137
|
+
this.avancar();
|
|
138
|
+
switch (this.simboloAtual()) {
|
|
139
|
+
case '/':
|
|
140
|
+
while (this.simboloAtual() != '\n' && !this.eFinalDoCodigo())
|
|
141
|
+
this.avancar();
|
|
142
|
+
break;
|
|
143
|
+
default:
|
|
144
|
+
this.adicionarSimbolo(mapler_1.default.DIVISAO);
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
break;
|
|
148
|
+
// Esta sessão ignora espaços em branco na tokenização.
|
|
149
|
+
// Ponto-e-vírgula é opcional em Delégua, então pode apenas ser ignorado.
|
|
150
|
+
case ' ':
|
|
151
|
+
case '\0':
|
|
152
|
+
case '\r':
|
|
153
|
+
case '\t':
|
|
154
|
+
this.avancar();
|
|
155
|
+
break;
|
|
156
|
+
case '\n':
|
|
157
|
+
// this.adicionarSimbolo(tiposDeSimbolos.QUEBRA_LINHA);
|
|
158
|
+
this.linha++;
|
|
159
|
+
this.avancar();
|
|
160
|
+
break;
|
|
161
|
+
// case '"':
|
|
162
|
+
// this.avancar();
|
|
163
|
+
// this.analisarTexto('"');
|
|
164
|
+
// this.avancar();
|
|
165
|
+
// break;
|
|
166
|
+
case '"':
|
|
167
|
+
this.avancar();
|
|
168
|
+
this.analisarTexto('"');
|
|
169
|
+
this.avancar();
|
|
170
|
+
break;
|
|
171
|
+
default:
|
|
172
|
+
if (this.eDigito(caractere))
|
|
173
|
+
this.analisarNumero();
|
|
174
|
+
else if (this.eAlfabeto(caractere))
|
|
175
|
+
this.identificarPalavraChave();
|
|
176
|
+
else {
|
|
177
|
+
this.erros.push({
|
|
178
|
+
linha: this.linha + 1,
|
|
179
|
+
caractere: caractere,
|
|
180
|
+
mensagem: 'Caractere inesperado.',
|
|
181
|
+
});
|
|
182
|
+
this.avancar();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
mapear(codigo, hashArquivo) {
|
|
187
|
+
this.erros = [];
|
|
188
|
+
this.simbolos = [];
|
|
189
|
+
this.inicioSimbolo = 0;
|
|
190
|
+
this.atual = 0;
|
|
191
|
+
this.linha = 0;
|
|
192
|
+
this.codigo = codigo.join('\n') || '';
|
|
193
|
+
this.hashArquivo = hashArquivo;
|
|
194
|
+
while (!this.eFinalDoCodigo()) {
|
|
195
|
+
this.inicioSimbolo = this.atual;
|
|
196
|
+
this.analisarToken();
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
simbolos: this.simbolos,
|
|
200
|
+
erros: this.erros,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
exports.LexadorMapler = LexadorMapler;
|
|
205
|
+
//# sourceMappingURL=lexador-mapler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lexador-mapler.js","sourceRoot":"","sources":["../../../../fontes/lexador/dialetos/lexador-mapler.ts"],"names":[],"mappings":";;;;;;AACA,0EAAoE;AAGpE,4EAA6D;AAC7D,0EAA8D;AAE9D,MAAa,aAAc,SAAQ,gDAAqB;IACpD,cAAc;QACV,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,EAAE;YACtC,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C;CACJ;AAjND,sCAiNC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
ate: string;
|
|
3
|
+
cadeia: string;
|
|
4
|
+
caractere: string;
|
|
5
|
+
de: string;
|
|
6
|
+
e: string;
|
|
7
|
+
enquanto: string;
|
|
8
|
+
entao: string;
|
|
9
|
+
escrever: string;
|
|
10
|
+
faca: string;
|
|
11
|
+
falso: string;
|
|
12
|
+
fim: string;
|
|
13
|
+
fimenquanto: string;
|
|
14
|
+
fimpara: string;
|
|
15
|
+
fimse: string;
|
|
16
|
+
inicio: string;
|
|
17
|
+
inteiro: string;
|
|
18
|
+
ler: string;
|
|
19
|
+
logico: string;
|
|
20
|
+
nao: string;
|
|
21
|
+
ou: string;
|
|
22
|
+
para: string;
|
|
23
|
+
real: string;
|
|
24
|
+
repita: string;
|
|
25
|
+
se: string;
|
|
26
|
+
senao: string;
|
|
27
|
+
variaveis: string;
|
|
28
|
+
verdadeiro: string;
|
|
29
|
+
vetor: string;
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mapler_1 = __importDefault(require("../../../tipos-de-simbolos/mapler"));
|
|
7
|
+
exports.default = {
|
|
8
|
+
ate: mapler_1.default.ATE,
|
|
9
|
+
cadeia: mapler_1.default.CADEIA,
|
|
10
|
+
caractere: mapler_1.default.CARACTERE,
|
|
11
|
+
de: mapler_1.default.DE,
|
|
12
|
+
e: mapler_1.default.E,
|
|
13
|
+
enquanto: mapler_1.default.ENQUANTO,
|
|
14
|
+
entao: mapler_1.default.ENTAO,
|
|
15
|
+
escrever: mapler_1.default.ESCREVER,
|
|
16
|
+
faca: mapler_1.default.FACA,
|
|
17
|
+
falso: mapler_1.default.FALSO,
|
|
18
|
+
fim: mapler_1.default.FIM,
|
|
19
|
+
fimenquanto: mapler_1.default.FIM_ENQUANTO,
|
|
20
|
+
fimpara: mapler_1.default.FIM_PARA,
|
|
21
|
+
fimse: mapler_1.default.FIM_SE,
|
|
22
|
+
inicio: mapler_1.default.INICIO,
|
|
23
|
+
inteiro: mapler_1.default.INTEIRO,
|
|
24
|
+
ler: mapler_1.default.LER,
|
|
25
|
+
logico: mapler_1.default.LOGICO,
|
|
26
|
+
nao: mapler_1.default.NEGACAO,
|
|
27
|
+
ou: mapler_1.default.OU,
|
|
28
|
+
para: mapler_1.default.PARA,
|
|
29
|
+
real: mapler_1.default.REAL,
|
|
30
|
+
repita: mapler_1.default.REPITA,
|
|
31
|
+
se: mapler_1.default.SE,
|
|
32
|
+
senao: mapler_1.default.SENAO,
|
|
33
|
+
variaveis: mapler_1.default.VARIAVEIS,
|
|
34
|
+
verdadeiro: mapler_1.default.VERDADEIRO,
|
|
35
|
+
vetor: mapler_1.default.VETOR,
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=mapler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapler.js","sourceRoot":"","sources":["../../../../../fontes/lexador/dialetos/palavras-reservadas/mapler.ts"],"names":[],"mappings":";;;;;AAAA,+EAAgE;AAEhE,kBAAe;IACX,GAAG,EAAE,gBAAe,CAAC,GAAG;IACxB,MAAM,EAAE,gBAAe,CAAC,MAAM;IAC9B,SAAS,EAAE,gBAAe,CAAC,SAAS;IACpC,EAAE,EAAE,gBAAe,CAAC,EAAE;IACtB,CAAC,EAAE,gBAAe,CAAC,CAAC;IACpB,QAAQ,EAAE,gBAAe,CAAC,QAAQ;IAClC,KAAK,EAAE,gBAAe,CAAC,KAAK;IAC5B,QAAQ,EAAE,gBAAe,CAAC,QAAQ;IAClC,IAAI,EAAE,gBAAe,CAAC,IAAI;IAC1B,KAAK,EAAE,gBAAe,CAAC,KAAK;IAC5B,GAAG,EAAE,gBAAe,CAAC,GAAG;IACxB,WAAW,EAAE,gBAAe,CAAC,YAAY;IACzC,OAAO,EAAE,gBAAe,CAAC,QAAQ;IACjC,KAAK,EAAE,gBAAe,CAAC,MAAM;IAC7B,MAAM,EAAE,gBAAe,CAAC,MAAM;IAC9B,OAAO,EAAE,gBAAe,CAAC,OAAO;IAChC,GAAG,EAAE,gBAAe,CAAC,GAAG;IACxB,MAAM,EAAE,gBAAe,CAAC,MAAM;IAC9B,GAAG,EAAE,gBAAe,CAAC,OAAO;IAC5B,EAAE,EAAE,gBAAe,CAAC,EAAE;IACtB,IAAI,EAAE,gBAAe,CAAC,IAAI;IAC1B,IAAI,EAAE,gBAAe,CAAC,IAAI;IAC1B,MAAM,EAAE,gBAAe,CAAC,MAAM;IAC9B,EAAE,EAAE,gBAAe,CAAC,EAAE;IACtB,KAAK,EAAE,gBAAe,CAAC,KAAK;IAC5B,SAAS,EAAE,gBAAe,CAAC,SAAS;IACpC,UAAU,EAAE,gBAAe,CAAC,UAAU;IACtC,KAAK,EAAE,gBAAe,CAAC,KAAK;CAC/B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
e: string;
|
|
3
|
-
em: string;
|
|
4
2
|
caso: string;
|
|
5
3
|
classe: string;
|
|
6
|
-
continua: string;
|
|
7
4
|
construtor: string;
|
|
5
|
+
continua: string;
|
|
6
|
+
e: string;
|
|
7
|
+
em: string;
|
|
8
8
|
enquanto: string;
|
|
9
9
|
escolha: string;
|
|
10
10
|
escreva: string;
|
|
@@ -19,8 +19,8 @@ declare const _default: {
|
|
|
19
19
|
leia: string;
|
|
20
20
|
nulo: string;
|
|
21
21
|
ou: string;
|
|
22
|
-
para: string;
|
|
23
22
|
padrao: string;
|
|
23
|
+
para: string;
|
|
24
24
|
pausa: string;
|
|
25
25
|
pegue: string;
|
|
26
26
|
retorna: string;
|
|
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const delegua_1 = __importDefault(require("../tipos-de-simbolos/delegua"));
|
|
7
7
|
exports.default = {
|
|
8
|
-
e: delegua_1.default.E,
|
|
9
|
-
em: delegua_1.default.EM,
|
|
10
8
|
caso: delegua_1.default.CASO,
|
|
11
9
|
classe: delegua_1.default.CLASSE,
|
|
12
|
-
continua: delegua_1.default.CONTINUA,
|
|
13
10
|
construtor: delegua_1.default.CONSTRUTOR,
|
|
11
|
+
continua: delegua_1.default.CONTINUA,
|
|
12
|
+
e: delegua_1.default.E,
|
|
13
|
+
em: delegua_1.default.EM,
|
|
14
14
|
enquanto: delegua_1.default.ENQUANTO,
|
|
15
15
|
escolha: delegua_1.default.ESCOLHA,
|
|
16
16
|
escreva: delegua_1.default.ESCREVA,
|
|
@@ -25,8 +25,8 @@ exports.default = {
|
|
|
25
25
|
leia: delegua_1.default.LEIA,
|
|
26
26
|
nulo: delegua_1.default.NULO,
|
|
27
27
|
ou: delegua_1.default.OU,
|
|
28
|
-
para: delegua_1.default.PARA,
|
|
29
28
|
padrao: delegua_1.default.PADRAO,
|
|
29
|
+
para: delegua_1.default.PARA,
|
|
30
30
|
pausa: delegua_1.default.PAUSA,
|
|
31
31
|
pegue: delegua_1.default.PEGUE,
|
|
32
32
|
retorna: delegua_1.default.RETORNA,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palavras-reservadas.js","sourceRoot":"","sources":["../../../fontes/lexador/palavras-reservadas.ts"],"names":[],"mappings":";;;;;AAAA,2EAA2D;AAE3D,kBAAe;IACX,
|
|
1
|
+
{"version":3,"file":"palavras-reservadas.js","sourceRoot":"","sources":["../../../fontes/lexador/palavras-reservadas.ts"],"names":[],"mappings":";;;;;AAAA,2EAA2D;AAE3D,kBAAe;IACX,IAAI,EAAE,iBAAe,CAAC,IAAI;IAC1B,MAAM,EAAE,iBAAe,CAAC,MAAM;I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{
|
|
|
26
26
|
ESCOLHA: string;
|
|
27
27
|
ESCREVA: string;
|
|
28
28
|
EXPONENCIACAO: string;
|
|
29
|
-
IGUAL: string;
|
|
30
|
-
IGUAL_IGUAL: string;
|
|
31
29
|
FALSO: string;
|
|
32
30
|
FAZER: string;
|
|
33
31
|
FINALMENTE: string;
|
|
@@ -35,6 +33,8 @@ declare const _default: {
|
|
|
35
33
|
FUNÇÃO: string;
|
|
36
34
|
HERDA: string;
|
|
37
35
|
IDENTIFICADOR: string;
|
|
36
|
+
IGUAL: string;
|
|
37
|
+
IGUAL_IGUAL: string;
|
|
38
38
|
IMPORTAR: string;
|
|
39
39
|
INCREMENTAR: string;
|
|
40
40
|
ISTO: string;
|
|
@@ -44,9 +44,9 @@ declare const _default: {
|
|
|
44
44
|
MAIOR_MAIOR: string;
|
|
45
45
|
MAIS_IGUAL: string;
|
|
46
46
|
MENOR: string;
|
|
47
|
-
MENOS_IGUAL: string;
|
|
48
47
|
MENOR_IGUAL: string;
|
|
49
48
|
MENOR_MENOR: string;
|
|
49
|
+
MENOS_IGUAL: string;
|
|
50
50
|
MODULO: string;
|
|
51
51
|
MODULO_IGUAL: string;
|
|
52
52
|
MULTIPLICACAO: string;
|
|
@@ -28,8 +28,6 @@ exports.default = {
|
|
|
28
28
|
ESCOLHA: 'ESCOLHA',
|
|
29
29
|
ESCREVA: 'ESCREVA',
|
|
30
30
|
EXPONENCIACAO: 'EXPONENCIACAO',
|
|
31
|
-
IGUAL: 'IGUAL',
|
|
32
|
-
IGUAL_IGUAL: 'IGUAL_IGUAL',
|
|
33
31
|
FALSO: 'FALSO',
|
|
34
32
|
FAZER: 'FAZER',
|
|
35
33
|
FINALMENTE: 'FINALMENTE',
|
|
@@ -37,6 +35,8 @@ exports.default = {
|
|
|
37
35
|
FUNÇÃO: 'FUNÇÃO',
|
|
38
36
|
HERDA: 'HERDA',
|
|
39
37
|
IDENTIFICADOR: 'IDENTIFICADOR',
|
|
38
|
+
IGUAL: 'IGUAL',
|
|
39
|
+
IGUAL_IGUAL: 'IGUAL_IGUAL',
|
|
40
40
|
IMPORTAR: 'IMPORTAR',
|
|
41
41
|
INCREMENTAR: 'INCREMENTAR',
|
|
42
42
|
ISTO: 'ISTO',
|
|
@@ -46,9 +46,9 @@ exports.default = {
|
|
|
46
46
|
MAIOR_MAIOR: 'MAIOR_MAIOR',
|
|
47
47
|
MAIS_IGUAL: 'MAIS_IGUAL',
|
|
48
48
|
MENOR: 'MENOR',
|
|
49
|
-
MENOS_IGUAL: 'MENOS_IGUAL',
|
|
50
49
|
MENOR_IGUAL: 'MENOR_IGUAL',
|
|
51
50
|
MENOR_MENOR: 'MENOR_MENOR',
|
|
51
|
+
MENOS_IGUAL: 'MENOS_IGUAL',
|
|
52
52
|
MODULO: 'MODULO',
|
|
53
53
|
MODULO_IGUAL: 'MODULO_IGUAL',
|
|
54
54
|
MULTIPLICACAO: 'MULTIPLICACAO',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegua.js","sourceRoot":"","sources":["../../../fontes/tipos-de-simbolos/delegua.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACX,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,MAAM,EAAE,QAAQ;IAChB,gBAAgB,EAAE,kBAAkB;IACpC,iBAAiB,EAAE,mBAAmB;IACtC,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,eAAe;IAC9B,eAAe,EAAE,iBAAiB;IAClC,qBAAqB,EAAE,uBAAuB;IAC9C,WAAW,EAAE,aAAa;IAC1B,CAAC,EAAE,G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B,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,eAAe;IAC9B,mBAAmB,EAAE,qBAAqB;IAC1C,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,iBAAiB,EAAE,mBAAmB;IACtC,kBAAkB,EAAE,oBAAoB;IACxC,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,eAAe,EAAE,iBAAiB;IAClC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,EAAE,EAAE,IAAI;IACR,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,SAAS;CACrB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
ADICAO: string;
|
|
3
|
+
ATE: string;
|
|
4
|
+
CADEIA: string;
|
|
5
|
+
CARACTERE: string;
|
|
6
|
+
COLCHETE_DIREITO: string;
|
|
7
|
+
COLCHETE_ESQUERDO: string;
|
|
8
|
+
DE: string;
|
|
9
|
+
DIFERENTE: string;
|
|
10
|
+
DIVISAO: string;
|
|
11
|
+
DOIS_PONTOS: string;
|
|
12
|
+
E: string;
|
|
13
|
+
ENQUANTO: string;
|
|
14
|
+
ENTAO: string;
|
|
15
|
+
ESCREVER: string;
|
|
16
|
+
FACA: string;
|
|
17
|
+
FALSO: string;
|
|
18
|
+
FIM: string;
|
|
19
|
+
FIM_ENQUANTO: string;
|
|
20
|
+
FIM_MODULO: string;
|
|
21
|
+
FIM_PARA: string;
|
|
22
|
+
FIM_SE: string;
|
|
23
|
+
IDENTIFICADOR: string;
|
|
24
|
+
IGUAL: string;
|
|
25
|
+
INICIO: string;
|
|
26
|
+
INTEIRO: string;
|
|
27
|
+
LER: string;
|
|
28
|
+
LOGICO: string;
|
|
29
|
+
MAIOR: string;
|
|
30
|
+
MAIOR_IGUAL: string;
|
|
31
|
+
MENOR: string;
|
|
32
|
+
MENOR_IGUAL: string;
|
|
33
|
+
MODULO: string;
|
|
34
|
+
MULTIPLICACAO: string;
|
|
35
|
+
NEGACAO: string;
|
|
36
|
+
NUMERO: string;
|
|
37
|
+
OU: string;
|
|
38
|
+
PARA: string;
|
|
39
|
+
PASSO: string;
|
|
40
|
+
PARENTESE_DIREITO: string;
|
|
41
|
+
PARENTESE_ESQUERDO: string;
|
|
42
|
+
PONTO: string;
|
|
43
|
+
PONTO_VIRGULA: string;
|
|
44
|
+
REAL: string;
|
|
45
|
+
REPITA: string;
|
|
46
|
+
SE: string;
|
|
47
|
+
SENAO: string;
|
|
48
|
+
SETA_ATRIBUICAO: string;
|
|
49
|
+
SUBTRACAO: string;
|
|
50
|
+
VARIAVEIS: string;
|
|
51
|
+
VERDADEIRO: string;
|
|
52
|
+
VETOR: string;
|
|
53
|
+
VIRGULA: string;
|
|
54
|
+
};
|
|
55
|
+
export default _default;
|