-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
628f53d
commit 264b977
Showing
73 changed files
with
1,018 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
casosDeTeste/comErrosLexicosSintaticos/entrada/exemplo1.faz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
comando_setup | ||
ativa(led, 5) | ||
fim_comando_setup | ||
|
||
comando_loop | ||
ligar(led) | ||
esperar(1000) | ||
desligar(led, 6) | ||
esperar(1000) | ||
fim_comando_loop |
17 changes: 17 additions & 0 deletions
17
casosDeTeste/comErrosLexicosSintaticos/entrada/exemplo2.faz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
constante pinSom: inteiro = 12 | ||
constante BREATH_DELAY: inteiro = 5 | ||
|
||
declare | ||
i: inteiro | ||
|
||
comando_setup | ||
ativar(led) | ||
fim_comando_setup | ||
|
||
comando_loop | ||
para i de 0 ate 256 faca | ||
ligar(led, pinSom, i) | ||
esperar() | ||
fim_para | ||
esperar(100) | ||
fim_comando_loop |
23 changes: 23 additions & 0 deletions
23
casosDeTeste/comErrosLexicosSintaticos/entrada/exemplo3.faz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
constante tempo: inteiro = 10 | ||
|
||
declare | ||
x: inteiro | ||
|
||
comando_setup | ||
|
||
ativar(luz, 1) | ||
ativar(botao, 5) | ||
|
||
fim_comando_setup | ||
|
||
comando_loop | ||
|
||
x <- ler(botao, 5) | ||
|
||
se x = 1 entao | ||
ligar(luz, 1, 10) | ||
esperar(tempo) | ||
desligar( 1) | ||
fim_se | ||
|
||
fim_comando_loop |
26 changes: 26 additions & 0 deletions
26
casosDeTeste/comErrosLexicosSintaticos/entrada/exemplo4.faz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
constante tempo: inteiro = 10 | ||
constante pinoSensor: inteiro = 6 | ||
constante pinoSom: inteiro = 6 | ||
|
||
declare | ||
y: inteiro | ||
|
||
comando_setup | ||
|
||
ativar(pinoSensor) | ||
ativar(som, pinoSom) | ||
|
||
fim_comando_setup | ||
|
||
comando_loop | ||
|
||
|
||
y <- ler(sensortoque, pinoSensor) | ||
|
||
se y = 1 entao | ||
ligar(som, pinoSom) | ||
fim_se | ||
|
||
desligar(som, pinoSom) | ||
|
||
fim_comando_loop |
28 changes: 28 additions & 0 deletions
28
casosDeTeste/comErrosLexicosSintaticos/entrada/exemplo5.faz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
constante tempo: inteiro = 1000 | ||
constante pinoPot: inteiro = 11 | ||
constante pinoLCD: inteiro = 21 | ||
|
||
declare | ||
y: real | ||
|
||
comando_setup | ||
|
||
ativar(potenciometro, pinoPot) | ||
ativar(lcd, pinoLCD) | ||
|
||
fim_comando_setup | ||
|
||
comando_loop | ||
y <- ler(sensortoque, pinoSensor) | ||
definirCor(lcd, pinoLCD, (10, 300)) | ||
imprimeLCD() | ||
esperar(tempo) | ||
fim_comando_loop | ||
|
||
procedimento imprimeLCD() | ||
declare | ||
mensagem: literal | ||
|
||
mensagem <- "Mexeu no potenciometro" | ||
escrever(lcd, pinoLCD, mensagem) | ||
fim_procedimento |
23 changes: 23 additions & 0 deletions
23
casosDeTeste/comErrosLexicosSintaticos/entrada/exemplo6.faz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
constante tempo: inteiro = 10 | ||
|
||
declare | ||
x: inteiro | ||
|
||
comando_setup | ||
|
||
ativar(luz, 3) | ||
ativar(botao, 5) | ||
|
||
fim_comando_setup | ||
|
||
comando_loop | ||
|
||
x <- ler( 5) | ||
|
||
se x = 1 entao | ||
ligar(luz, 3, 1000) | ||
esperar(tempo) | ||
desligar(luz, 3) | ||
fim_se | ||
|
||
fim_comando_loop |
29 changes: 29 additions & 0 deletions
29
casosDeTeste/comErrosLexicosSintaticos/entrada/exemplo7.faz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
constante tempo: inteiro = 1000 | ||
constante pinoPot: inteiro = 14 | ||
|
||
declare | ||
y: real | ||
declare | ||
mensagem: literal | ||
|
||
comando_setup | ||
|
||
ativar(potenciometro, pinoPot) | ||
|
||
fim_comando_setup | ||
|
||
comando_loop | ||
|
||
leia (mensagem) | ||
se mensagem = "sim" entao | ||
lr(sensortoque, pinoPot | ||
mensagem <- "O potenciometro foi variado." | ||
escreva(mensagem) | ||
esperar(tempo) | ||
mensagem <- "0" | ||
senao | ||
escreva("esperando digitar 'sim' para fazer a leitura") | ||
|
||
fim_se | ||
|
||
fim_comando_loop |
2 changes: 2 additions & 0 deletions
2
casosDeTeste/comErrosLexicosSintaticos/saída/erro-ls-exemplo1.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Linha 2: erro sintatico proximo a ativa | ||
Fim da compilacao |
2 changes: 2 additions & 0 deletions
2
casosDeTeste/comErrosLexicosSintaticos/saída/erro-ls-exemplo2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Linha 8: erro sintatico proximo a ) | ||
Fim da compilacao |
2 changes: 2 additions & 0 deletions
2
casosDeTeste/comErrosLexicosSintaticos/saída/erro-ls-exemplo3.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Linha 20: erro sintatico proximo a 1 | ||
Fim da compilacao |
2 changes: 2 additions & 0 deletions
2
casosDeTeste/comErrosLexicosSintaticos/saída/erro-ls-exemplo4.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Linha 10: erro sintatico proximo a pinoSensor | ||
Fim da compilacao |
2 changes: 2 additions & 0 deletions
2
casosDeTeste/comErrosLexicosSintaticos/saída/erro-ls-exemplo5.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Linha 17: erro sintatico proximo a ) | ||
Fim da compilacao |
2 changes: 2 additions & 0 deletions
2
casosDeTeste/comErrosLexicosSintaticos/saída/erro-ls-exemplo6.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Linha 15: erro sintatico proximo a 5 | ||
Fim da compilacao |
2 changes: 2 additions & 0 deletions
2
casosDeTeste/comErrosLexicosSintaticos/saída/erro-ls-exemplo7.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Linha 19: erro sintatico proximo a sensortoque | ||
Fim da compilacao |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
comando_setup | ||
ativar(led, 5) | ||
fim_comando_setup | ||
|
||
comando_loop | ||
ligar(led, 6) | ||
esperar(1000) | ||
desligar(led, 6) | ||
esperar(1000) | ||
fim_comando_loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
constante pinSom: inteiro = 12 | ||
constante BREATH_DELAY: inteiro = 5 | ||
|
||
declare | ||
i: inteiro | ||
|
||
comando_setup | ||
ativar(led, pinSom) | ||
fim_comando_setup | ||
|
||
comando_loop | ||
para i de 0 ate 256 faca | ||
ligar(led, pinSom, i) | ||
esperar(BREATH_DELAY) | ||
fim_para | ||
esperar(100) | ||
fim_comando_loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
constante tempo: inteiro = 10 | ||
|
||
declare | ||
x: inteiro | ||
|
||
comando_setup | ||
|
||
ativar(luz, 1) | ||
ativar(botao, 5) | ||
|
||
fim_comando_setup | ||
|
||
comando_loop | ||
|
||
x <- ler(botao, 5) | ||
|
||
se x = 1 entao | ||
ligar(luz, 1, 10) | ||
esperar(tempo) | ||
desligar(luz, 1) | ||
fim_se | ||
|
||
fim_comando_loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
constante tempo: inteiro = 10 | ||
constante pinoSensor: inteiro = 6 | ||
constante pinoSom: inteiro = 6 | ||
|
||
declare | ||
y: inteiro | ||
|
||
comando_setup | ||
|
||
ativar(sensortoque, pinoSensor) | ||
ativar(som, pinoSom) | ||
|
||
fim_comando_setup | ||
|
||
comando_loop | ||
|
||
|
||
y <- ler(sensortoque, pinoSensor) | ||
|
||
se y = 1 entao | ||
ligar(som, pinoSom) | ||
fim_se | ||
|
||
desligar(som, pinoSom) | ||
|
||
fim_comando_loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
constante tempo: inteiro = 1000 | ||
constante pinoPot: inteiro = 11 | ||
constante pinoLCD: inteiro = 21 | ||
|
||
declare | ||
y: real | ||
|
||
comando_setup | ||
|
||
ativar(potenciometro, pinoPot) | ||
ativar(lcd, pinoLCD) | ||
|
||
fim_comando_setup | ||
|
||
comando_loop | ||
y <- ler(sensortoque, pinoSensor) | ||
definirCor(lcd, pinoLCD, (10, 10, 300)) | ||
imprimeLCD() | ||
esperar(tempo) | ||
fim_comando_loop | ||
|
||
procedimento imprimeLCD() | ||
declare | ||
mensagem: literal | ||
|
||
mensagem <- "Mexeu no potenciometro" | ||
escrever(lcd, pinoLCD, mensagem) | ||
fim_procedimento |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
constante tempo: inteiro = 10 | ||
|
||
declare | ||
x: inteiro | ||
|
||
comando_setup | ||
|
||
ativar(luz, 3) | ||
ativar(botao, 5) | ||
|
||
fim_comando_setup | ||
|
||
comando_loop | ||
|
||
x <- ler(botao, 5) | ||
|
||
se x = 1 entao | ||
ligar(luz, 3, 1000) | ||
esperar(tempo) | ||
desligar(luz, 3) | ||
fim_se | ||
|
||
fim_comando_loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
constante tempo: inteiro = 1000 | ||
constante pinoPot: inteiro = 14 | ||
|
||
declare | ||
y: real | ||
declare | ||
mensagem: literal | ||
|
||
comando_setup | ||
|
||
ativar(potenciometro, pinoPot) | ||
|
||
fim_comando_setup | ||
|
||
comando_loop | ||
|
||
leia (mensagem) | ||
se mensagem = "sim" entao | ||
y <- ler(sensortoque, pinoPot) | ||
mensagem <- "O potenciometro foi variado." | ||
escreva(mensagem) | ||
esperar(tempo) | ||
mensagem <- "0" | ||
senao | ||
escreva("esperando digitar 'sim' para fazer a leitura") | ||
|
||
fim_se | ||
|
||
fim_comando_loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
constante tempo: inteiro = 1000 | ||
constante pinoPot: inteiro = 11 | ||
constante pinoLCD: inteiro = 21 | ||
|
||
declare | ||
y: real | ||
|
||
procedimento imprimeLCD() | ||
declare | ||
mensagem: literal | ||
|
||
mensagem <- "Mexeu no potenciometro" | ||
escrever(lcd, pinoLCD, mensagem) | ||
fim_procedimento | ||
|
||
comando_setup | ||
|
||
ativar(potenciometro, pinoPot) | ||
ativar(lcd, pinoLCD) | ||
|
||
fim_comando_setup | ||
|
||
comando_loop | ||
y <- ler(sensortoque, pinoSensor) | ||
definirCor(lcd, pinoLCD, (10, 10, 300)) | ||
imprimeLCD() | ||
esperar(tempo) | ||
fim_comando_loop | ||
|
Oops, something went wrong.