Igor 2 năm trước cách đây
mục cha
commit
60407be9bd
100 tập tin đã thay đổi với 1345 bổ sung58723 xóa
  1. 5 0
      curso.php
  2. 80 5
      functions.php
  3. 0 54220
      ivprog_contexto/build/ivprog.bundle.js
  4. 0 1
      ivprog_contexto/build/ivprog.bundle.js.map
  5. 349 0
      ivprog_contexto/css/codemirror.css
  6. BIN
      ivprog_contexto/css/fonts/NimbusSanLConBold.ttf
  7. BIN
      ivprog_contexto/css/fonts/NimbusSanLConRegular.ttf
  8. BIN
      ivprog_contexto/css/fonts/cyrillic-ext-roboto.woff2
  9. BIN
      ivprog_contexto/css/fonts/cyrillic-roboto.woff2
  10. BIN
      ivprog_contexto/css/fonts/greek-ext-roboto.woff2
  11. BIN
      ivprog_contexto/css/fonts/greek-roboto.woff2
  12. BIN
      ivprog_contexto/css/fonts/latin-ext-roboto.woff2
  13. BIN
      ivprog_contexto/css/fonts/latin-roboto.woff2
  14. BIN
      ivprog_contexto/css/fonts/texgyreheros-regular.otf
  15. BIN
      ivprog_contexto/css/fonts/vietnamese-roboto.woff2
  16. 121 0
      ivprog_contexto/css/ivprog-assessment.css
  17. 3 0
      ivprog_contexto/css/ivprog-editor.css
  18. 148 11
      ivprog_contexto/css/ivprog-term.css
  19. 338 37
      ivprog_contexto/css/ivprog-visual-1.0.css
  20. 56 0
      ivprog_contexto/css/roboto.css
  21. 66 58
      ivprog_contexto/js/semantic/semantic.min.css
  22. 36 0
      ivprog_contexto/css/show-hint.css
  23. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/brand-icons.eot
  24. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/brand-icons.svg
  25. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/brand-icons.ttf
  26. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/brand-icons.woff
  27. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/brand-icons.woff2
  28. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.eot
  29. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.otf
  30. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.svg
  31. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.ttf
  32. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.woff
  33. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.woff2
  34. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/outline-icons.eot
  35. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/outline-icons.svg
  36. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/outline-icons.ttf
  37. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/outline-icons.woff
  38. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/fonts/outline-icons.woff2
  39. 0 0
      ivprog_contexto/js/semantic/themes/default/assets/images/flags.png
  40. 64 0
      ivprog_contexto/css/ttcn.css
  41. 0 86
      ivprog_contexto/i18n/en/error.json
  42. 0 9
      ivprog_contexto/i18n/en/index.js
  43. 0 3
      ivprog_contexto/i18n/en/message.json
  44. 0 135
      ivprog_contexto/i18n/en/ui.json
  45. 0 86
      ivprog_contexto/i18n/es/error.json
  46. 0 9
      ivprog_contexto/i18n/es/index.js
  47. 0 3
      ivprog_contexto/i18n/es/message.json
  48. 0 140
      ivprog_contexto/i18n/es/ui.json
  49. 0 117
      ivprog_contexto/i18n/i18n-database.json
  50. 0 9
      ivprog_contexto/i18n/index.js
  51. 0 86
      ivprog_contexto/i18n/pt/error.json
  52. 0 9
      ivprog_contexto/i18n/pt/index.js
  53. 0 3
      ivprog_contexto/i18n/pt/message.json
  54. 0 142
      ivprog_contexto/i18n/pt/ui.json
  55. BIN
      ivprog_contexto/img/background-panel.png
  56. 1 0
      ivprog_contexto/img/empty.svg
  57. 1 0
      ivprog_contexto/img/new_line.svg
  58. 1 0
      ivprog_contexto/img/no_new_line.svg
  59. BIN
      ivprog_contexto/img/trash-icon.png
  60. 74 35
      ivprog_contexto/index.html
  61. 2 1491
      ivprog_contexto/js/Sortable.js
  62. 0 92
      ivprog_contexto/js/assessment/ivprogAssessment.js
  63. 0 47
      ivprog_contexto/js/ast/ASA.txt
  64. 0 10
      ivprog_contexto/js/ast/commands/arrayAssign.js
  65. 0 10
      ivprog_contexto/js/ast/commands/arrayDeclaration.js
  66. 0 10
      ivprog_contexto/js/ast/commands/assign.js
  67. 0 8
      ivprog_contexto/js/ast/commands/break.js
  68. 0 18
      ivprog_contexto/js/ast/commands/case.js
  69. 0 14
      ivprog_contexto/js/ast/commands/command.js
  70. 0 16
      ivprog_contexto/js/ast/commands/commandBlock.js
  71. 0 12
      ivprog_contexto/js/ast/commands/declaration.js
  72. 0 13
      ivprog_contexto/js/ast/commands/doWhile.js
  73. 0 16
      ivprog_contexto/js/ast/commands/for.js
  74. 0 17
      ivprog_contexto/js/ast/commands/formalParameter.js
  75. 0 32
      ivprog_contexto/js/ast/commands/function.js
  76. 0 11
      ivprog_contexto/js/ast/commands/ifThenElse.js
  77. 0 37
      ivprog_contexto/js/ast/commands/index.js
  78. 0 10
      ivprog_contexto/js/ast/commands/return.js
  79. 0 10
      ivprog_contexto/js/ast/commands/switch.js
  80. 0 12
      ivprog_contexto/js/ast/commands/sysCall.js
  81. 0 18
      ivprog_contexto/js/ast/commands/while.js
  82. 0 8
      ivprog_contexto/js/ast/error/syntaxError.js
  83. 0 70
      ivprog_contexto/js/ast/error/syntaxErrorFactory.js
  84. 0 24
      ivprog_contexto/js/ast/expressions/arrayAccess.js
  85. 0 87
      ivprog_contexto/js/ast/expressions/arrayLiteral.js
  86. 0 15
      ivprog_contexto/js/ast/expressions/boolLiteral.js
  87. 0 14
      ivprog_contexto/js/ast/expressions/expression.js
  88. 0 36
      ivprog_contexto/js/ast/expressions/functionCall.js
  89. 0 23
      ivprog_contexto/js/ast/expressions/index.js
  90. 0 18
      ivprog_contexto/js/ast/expressions/infixApp.js
  91. 0 15
      ivprog_contexto/js/ast/expressions/intLiteral.js
  92. 0 9
      ivprog_contexto/js/ast/expressions/literal.js
  93. 0 15
      ivprog_contexto/js/ast/expressions/realLiteral.js
  94. 0 14
      ivprog_contexto/js/ast/expressions/stringLiteral.js
  95. 0 14
      ivprog_contexto/js/ast/expressions/unaryApp.js
  96. 0 14
      ivprog_contexto/js/ast/expressions/variableLiteral.js
  97. 0 1182
      ivprog_contexto/js/ast/ivprogParser.js
  98. 0 35
      ivprog_contexto/js/ast/operators.js
  99. 0 22
      ivprog_contexto/js/ast/sourceInfo.js
  100. 0 0
      ivprog_contexto/js/iassign-integration-functions.js

+ 5 - 0
curso.php

@@ -78,9 +78,14 @@ $exercicios = listarExercicios($_GET['curso']);
               <select class="form-control" id="inputexercicio" name="exercicio">
                 <option value="Todos">Todos</option>
                 <?php
+<<<<<<< HEAD
 
                   foreach ($exercicios as $exercicio) {
                     echo "<option value='$exercicio'>$exercicio</option>";
+=======
+                  for ($i = 0; $i < count($exercicios); $i++) {
+                    echo "<option value='".$exercicios[$i][1]."'>" . str_replace('_', ' ', $exercicios[$i][0]) . "</option>";
+>>>>>>> master
                   }
                   
                 ?>

+ 80 - 5
functions.php

@@ -49,7 +49,11 @@ function deleteFolderAndFiles($dir) {
 }
 
 function pegarLogsDoAluno ($curso, $aluno, $exercicio) {
+<<<<<<< HEAD
 
+=======
+	echo $curso . ' ' . $aluno  . ' ' . $exercicio . ' ';
+>>>>>>> master
 	$zip = new ZipArchive;
 	$dir    = 'cursos/' . $curso;
   	$files1 = scandir($dir);
@@ -57,15 +61,15 @@ function pegarLogsDoAluno ($curso, $aluno, $exercicio) {
 
   	if (count($files1) < 3) {
   		return null;
-  	}
-
+	  }
+	
   	for ($i = 0; $i < count($files1); $i++) {
   		if ($files1[$i] == "." || $files1[$i] == "..") continue;
   		if ( strpos($files1[$i], $aluno) !== false ) {
   			array_push($nomes, $files1[$i]);
   		}
   	}
-
+	  
   	for ($i = 0; $i < count($nomes); $i++) {
   		if ($nomes[$i] == "." || $nomes[$i] == "..") continue;
   		$res = $zip->open($dir . '/' . $nomes[$i]);
@@ -77,7 +81,7 @@ function pegarLogsDoAluno ($curso, $aluno, $exercicio) {
 
   	$dir    = 'temp';
   	$files1 = scandir($dir);
-  	
+	  
   	if (count($files1) < 3) {
   		return null;
   	}
@@ -99,13 +103,14 @@ function pegarLogsDoAluno ($curso, $aluno, $exercicio) {
   		if (strpos($fi, $exercicio) !== false) {
   			$arquivo = $files1[$i];
   		} else {
-  			unlink($dir . '/' . $files1[$i]);
+  			//unlink($dir . '/' . $files1[$i]);
   		}
   	}
 
   	return $arquivo;
 }
 
+<<<<<<< HEAD
 
 function pegarArquivoMaisRecente ($curso, $aluno, $exercicio) {
 
@@ -138,6 +143,45 @@ function pegarArquivoMaisRecente ($curso, $aluno, $exercicio) {
 
 	return $registro_mais_atual[1];
 	
+=======
+function pegarLogsDoAlunoComoString ($arquivo) {
+	$handle = fopen("temp/" . $arquivo, "r");
+	$inicio = false;
+	$string_final = "";
+	if ($handle) {
+	    while (($line = fgets($handle)) !== false) {
+			// Linhas comentadas, pq o formato dos logs foi alterado!
+			// if (strpos($line, "::logs::") !== false) {
+  			// 	$inicio = true;
+  			// 	continue;
+  			// }
+  			// if ($inicio) {
+  			// 	$ex = explode(",", $line);
+  			// 	if (count($ex) > 3) {
+  			// 		$string_final .= $ex[1] . "," . $ex[2] . ",1,0\\n";
+  			// 	}
+			  // }
+			if (strpos($line, "::logs::") !== false) {
+				$string_final = explode("::logs::", $line)[1];
+				break;
+			}
+	    }
+	    fclose($handle);
+	} else {
+	    echo "ERRO AO LER O ARQUIVO";
+	}
+
+	$logs_array = explode("[", $string_final);
+	$string_final = "";
+	foreach ($logs_array as $item) {
+		$mins = explode(",", $item);
+		if ($mins[0] && is_numeric($mins[0])) {
+			$string_final .= $mins[0] . "," . $mins[1] . ",1,0\\n";
+		}
+	}
+
+	return $string_final;
+>>>>>>> master
 }
 
 function pegarLogsDoAlunoComoString ($curso, $aluno, $exercicio) {
@@ -207,6 +251,7 @@ function abrirArquivoCSV ($curso, $delete_temp = true) {
 	}
 	fclose($file);
 
+<<<<<<< HEAD
 	if ($delete_temp)
 		deleteFolderAndFiles($temp_folder);
 
@@ -230,6 +275,36 @@ function listarAlunos ($curso) {
 	asort($nomes);
 
 	return $nomes;
+=======
+	  	$exp = explode("-", $files1[$i]);
+	  	$fi = "";
+	  	for ($j = 0; $j < count($exp) - 1; $j++) {
+	  		$fi .= $exp[$j];
+	  		if ($j < (count($exp) - 3)) {
+	  			$fi .= "-";
+	  		}
+		  }
+
+	  	$ja_existe = false;
+	  	for ($j = 0; $j < count($exercicios); $j++) {
+	  		if ($exercicios[$j][0] == $fi) {
+	  			$ja_existe = true;
+	  			break;
+	  		}
+		  }		  
+
+	  	if (!$ja_existe) {
+			$temp = explode("202", $files1[$i])[0];
+			$ft = [$fi, $temp];
+
+	  		array_push($exercicios, $ft);
+	  	}
+
+	  	unlink($dir . '/' . $files1[$i]);
+	  }
+	  
+  	return $exercicios;
+>>>>>>> master
 }
 
 function listarExercicios ($curso) {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 54220
ivprog_contexto/build/ivprog.bundle.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 1
ivprog_contexto/build/ivprog.bundle.js.map


+ 349 - 0
ivprog_contexto/css/codemirror.css

@@ -0,0 +1,349 @@
+/* BASICS */
+
+.CodeMirror {
+  /* Set height, width, borders, and global font properties here */
+  font-family: monospace;
+  height: 300px;
+  color: black;
+  direction: ltr;
+}
+
+/* PADDING */
+
+.CodeMirror-lines {
+  padding: 4px 0; /* Vertical padding around content */
+}
+.CodeMirror pre.CodeMirror-line,
+.CodeMirror pre.CodeMirror-line-like {
+  padding: 0 4px; /* Horizontal padding of content */
+}
+
+.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
+  background-color: white; /* The little square between H and V scrollbars */
+}
+
+/* GUTTER */
+
+.CodeMirror-gutters {
+  border-right: 1px solid #ddd;
+  background-color: #f7f7f7;
+  white-space: nowrap;
+}
+.CodeMirror-linenumbers {}
+.CodeMirror-linenumber {
+  padding: 0 3px 0 5px;
+  min-width: 20px;
+  text-align: right;
+  color: #999;
+  white-space: nowrap;
+}
+
+.CodeMirror-guttermarker { color: black; }
+.CodeMirror-guttermarker-subtle { color: #999; }
+
+/* CURSOR */
+
+.CodeMirror-cursor {
+  border-left: 1px solid black;
+  border-right: none;
+  width: 0;
+}
+/* Shown when moving in bi-directional text */
+.CodeMirror div.CodeMirror-secondarycursor {
+  border-left: 1px solid silver;
+}
+.cm-fat-cursor .CodeMirror-cursor {
+  width: auto;
+  border: 0 !important;
+  background: #7e7;
+}
+.cm-fat-cursor div.CodeMirror-cursors {
+  z-index: 1;
+}
+.cm-fat-cursor-mark {
+  background-color: rgba(20, 255, 20, 0.5);
+  -webkit-animation: blink 1.06s steps(1) infinite;
+  -moz-animation: blink 1.06s steps(1) infinite;
+  animation: blink 1.06s steps(1) infinite;
+}
+.cm-animate-fat-cursor {
+  width: auto;
+  border: 0;
+  -webkit-animation: blink 1.06s steps(1) infinite;
+  -moz-animation: blink 1.06s steps(1) infinite;
+  animation: blink 1.06s steps(1) infinite;
+  background-color: #7e7;
+}
+@-moz-keyframes blink {
+  0% {}
+  50% { background-color: transparent; }
+  100% {}
+}
+@-webkit-keyframes blink {
+  0% {}
+  50% { background-color: transparent; }
+  100% {}
+}
+@keyframes blink {
+  0% {}
+  50% { background-color: transparent; }
+  100% {}
+}
+
+/* Can style cursor different in overwrite (non-insert) mode */
+.CodeMirror-overwrite .CodeMirror-cursor {}
+
+.cm-tab { display: inline-block; text-decoration: inherit; }
+
+.CodeMirror-rulers {
+  position: absolute;
+  left: 0; right: 0; top: -50px; bottom: 0;
+  overflow: hidden;
+}
+.CodeMirror-ruler {
+  border-left: 1px solid #ccc;
+  top: 0; bottom: 0;
+  position: absolute;
+}
+
+/* DEFAULT THEME */
+
+.cm-s-default .cm-header {color: blue;}
+.cm-s-default .cm-quote {color: #090;}
+.cm-negative {color: #d44;}
+.cm-positive {color: #292;}
+.cm-header, .cm-strong {font-weight: bold;}
+.cm-em {font-style: italic;}
+.cm-link {text-decoration: underline;}
+.cm-strikethrough {text-decoration: line-through;}
+
+.cm-s-default .cm-keyword {color: #708;}
+.cm-s-default .cm-atom {color: #219;}
+.cm-s-default .cm-number {color: #164;}
+.cm-s-default .cm-def {color: #00f;}
+.cm-s-default .cm-variable,
+.cm-s-default .cm-punctuation,
+.cm-s-default .cm-property,
+.cm-s-default .cm-operator {}
+.cm-s-default .cm-variable-2 {color: #05a;}
+.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
+.cm-s-default .cm-comment {color: #a50;}
+.cm-s-default .cm-string {color: #a11;}
+.cm-s-default .cm-string-2 {color: #f50;}
+.cm-s-default .cm-meta {color: #555;}
+.cm-s-default .cm-qualifier {color: #555;}
+.cm-s-default .cm-builtin {color: #30a;}
+.cm-s-default .cm-bracket {color: #997;}
+.cm-s-default .cm-tag {color: #170;}
+.cm-s-default .cm-attribute {color: #00c;}
+.cm-s-default .cm-hr {color: #999;}
+.cm-s-default .cm-link {color: #00c;}
+
+.cm-s-default .cm-error {color: #f00;}
+.cm-invalidchar {color: #f00;}
+
+.CodeMirror-composing { border-bottom: 2px solid; }
+
+/* Default styles for common addons */
+
+div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
+div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
+.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
+.CodeMirror-activeline-background {background: #e8f2ff;}
+
+/* STOP */
+
+/* The rest of this file contains styles related to the mechanics of
+   the editor. You probably shouldn't touch them. */
+
+.CodeMirror {
+  position: relative;
+  overflow: hidden;
+  background: white;
+}
+
+.CodeMirror-scroll {
+  overflow: scroll !important; /* Things will break if this is overridden */
+  /* 50px is the magic margin used to hide the element's real scrollbars */
+  /* See overflow: hidden in .CodeMirror */
+  margin-bottom: -50px; margin-right: -50px;
+  padding-bottom: 50px;
+  height: 100%;
+  outline: none; /* Prevent dragging from highlighting the element */
+  position: relative;
+}
+.CodeMirror-sizer {
+  position: relative;
+  border-right: 50px solid transparent;
+}
+
+/* The fake, visible scrollbars. Used to force redraw during scrolling
+   before actual scrolling happens, thus preventing shaking and
+   flickering artifacts. */
+.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
+  position: absolute;
+  z-index: 6;
+  display: none;
+}
+.CodeMirror-vscrollbar {
+  right: 0; top: 0;
+  overflow-x: hidden;
+  overflow-y: scroll;
+}
+.CodeMirror-hscrollbar {
+  bottom: 0; left: 0;
+  overflow-y: hidden;
+  overflow-x: scroll;
+}
+.CodeMirror-scrollbar-filler {
+  right: 0; bottom: 0;
+}
+.CodeMirror-gutter-filler {
+  left: 0; bottom: 0;
+}
+
+.CodeMirror-gutters {
+  position: absolute; left: 0; top: 0;
+  min-height: 100%;
+  z-index: 3;
+}
+.CodeMirror-gutter {
+  white-space: normal;
+  height: 100%;
+  display: inline-block;
+  vertical-align: top;
+  margin-bottom: -50px;
+}
+.CodeMirror-gutter-wrapper {
+  position: absolute;
+  z-index: 4;
+  background: none !important;
+  border: none !important;
+}
+.CodeMirror-gutter-background {
+  position: absolute;
+  top: 0; bottom: 0;
+  z-index: 4;
+}
+.CodeMirror-gutter-elt {
+  position: absolute;
+  cursor: default;
+  z-index: 4;
+}
+.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
+.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
+
+.CodeMirror-lines {
+  cursor: text;
+  min-height: 1px; /* prevents collapsing before first draw */
+}
+.CodeMirror pre.CodeMirror-line,
+.CodeMirror pre.CodeMirror-line-like {
+  /* Reset some styles that the rest of the page might have set */
+  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
+  border-width: 0;
+  background: transparent;
+  font-family: inherit;
+  font-size: inherit;
+  margin: 0;
+  white-space: pre;
+  word-wrap: normal;
+  line-height: inherit;
+  color: inherit;
+  z-index: 2;
+  position: relative;
+  overflow: visible;
+  -webkit-tap-highlight-color: transparent;
+  -webkit-font-variant-ligatures: contextual;
+  font-variant-ligatures: contextual;
+}
+.CodeMirror-wrap pre.CodeMirror-line,
+.CodeMirror-wrap pre.CodeMirror-line-like {
+  word-wrap: break-word;
+  white-space: pre-wrap;
+  word-break: normal;
+}
+
+.CodeMirror-linebackground {
+  position: absolute;
+  left: 0; right: 0; top: 0; bottom: 0;
+  z-index: 0;
+}
+
+.CodeMirror-linewidget {
+  position: relative;
+  z-index: 2;
+  padding: 0.1px; /* Force widget margins to stay inside of the container */
+}
+
+.CodeMirror-widget {}
+
+.CodeMirror-rtl pre { direction: rtl; }
+
+.CodeMirror-code {
+  outline: none;
+}
+
+/* Force content-box sizing for the elements where we expect it */
+.CodeMirror-scroll,
+.CodeMirror-sizer,
+.CodeMirror-gutter,
+.CodeMirror-gutters,
+.CodeMirror-linenumber {
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+}
+
+.CodeMirror-measure {
+  position: absolute;
+  width: 100%;
+  height: 0;
+  overflow: hidden;
+  visibility: hidden;
+}
+
+.CodeMirror-cursor {
+  position: absolute;
+  pointer-events: none;
+}
+.CodeMirror-measure pre { position: static; }
+
+div.CodeMirror-cursors {
+  visibility: hidden;
+  position: relative;
+  z-index: 3;
+}
+div.CodeMirror-dragcursors {
+  visibility: visible;
+}
+
+.CodeMirror-focused div.CodeMirror-cursors {
+  visibility: visible;
+}
+
+.CodeMirror-selected { background: #d9d9d9; }
+.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
+.CodeMirror-crosshair { cursor: crosshair; }
+.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
+.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
+
+.cm-searching {
+  background-color: #ffa;
+  background-color: rgba(255, 255, 0, .4);
+}
+
+/* Used to force a border model for a node */
+.cm-force-border { padding-right: .1px; }
+
+@media print {
+  /* Hide the cursor when printing */
+  .CodeMirror div.CodeMirror-cursors {
+    visibility: hidden;
+  }
+}
+
+/* See issue #2901 */
+.cm-tab-wrap-hack:after { content: ''; }
+
+/* Help users use markselection to safely style text background */
+span.CodeMirror-selectedtext { background: none; }

BIN
ivprog_contexto/css/fonts/NimbusSanLConBold.ttf


BIN
ivprog_contexto/css/fonts/NimbusSanLConRegular.ttf


BIN
ivprog_contexto/css/fonts/cyrillic-ext-roboto.woff2


BIN
ivprog_contexto/css/fonts/cyrillic-roboto.woff2


BIN
ivprog_contexto/css/fonts/greek-ext-roboto.woff2


BIN
ivprog_contexto/css/fonts/greek-roboto.woff2


BIN
ivprog_contexto/css/fonts/latin-ext-roboto.woff2


BIN
ivprog_contexto/css/fonts/latin-roboto.woff2


BIN
ivprog_contexto/css/fonts/texgyreheros-regular.otf


BIN
ivprog_contexto/css/fonts/vietnamese-roboto.woff2


+ 121 - 0
ivprog_contexto/css/ivprog-assessment.css

@@ -0,0 +1,121 @@
+@font-face {
+  font-family: 'NimbusSanLConRegular';
+  src: url(fonts/NimbusSanLConRegular.ttf) format('truetype');
+  font-weight: normal;
+  font-style: normal;
+}
+@font-face {
+  font-family: 'NimbusSanLConBold';
+  src: url(fonts/NimbusSanLConBold.ttf) format('truetype');
+  font-weight: bold;
+  font-style: normal;
+}
+@font-face {
+  font-family: 'TeXGyreHerosRegular';
+  src: url(fonts/texgyreheros-regular.otf) format('opentype');
+  font-weight: normal;
+  font-style: normal;
+}
+body {
+  font-family: 'TeXGyreHerosRegular';
+  background-color: #b9c7ca;
+  margin-left: 2rem;
+}
+.details-body > .details-header > h2 {margin-bottom: 0.5rem;}
+.details-body > .details-header > p {
+  padding-left: 1rem;
+  margin: 0;
+}
+table td { font-size: 14pt;}
+.stringdiff-delete, .stringdiff-insert {font-weight: bold;}
+.stringdiff-insert, .assessment-input-read {color: #22a222}
+.stringdiff-delete {
+  text-decoration: line-through;
+  color: #d02929
+}
+.details-body h3 {
+  margin-top: 0.5rem;
+  margin-bottom: 0.5rem;
+}
+.detaisl-div-table {
+  padding-left: 1rem;
+  margin-top: 1rem;
+}
+.assessment-output-table {
+  border-collapse: collapse;
+  border-style: hidden;
+}
+.assessment-output-table tr:nth-child(odd) {background: #CCC}
+.assessment-output-table tr:nth-child(even) {background: #f7f2c9}
+.assessment-output-table tr > th {
+  background-color: #000;
+  color: #fff;
+  font-family: 'NimbusSansLBoldCond';
+  font-weight: bold;
+  font-style: normal; 
+  letter-spacing: .05rem;
+}
+.assessment-output-table td, .assessment-output-table th {
+  border-left: 1px solid black;
+  padding: 0.5rem;
+  text-align: center;
+  max-width: 16rem;
+  font-family: 'NimbusSanLConRegular';
+  vertical-align: middle;
+  letter-spacing: .05rem;
+}
+.assessment-string-expected, .assessment-string-generated, .assessment-string-diff {text-align: left;}
+p.assessment-failed-execution {padding-left: 1rem;}
+.assessment-failed-case {
+  color:#FF1212;
+  padding-right: 1rem;
+}
+.assessment-input-unread {color: #d02929}
+.assessment-number-result-failed, .assessment-bool-result-failed {color: #d02929}
+.assessment-number-result, .assessment-bool-result, .assessment-string-result {color: #22a222}
+.assessment-popup {
+  position: relative;
+  display: inline-block;
+  cursor: pointer;
+}
+.assessment-popup .assessment-popuptext {
+  visibility: hidden;
+  width: 160px;
+  background-color: #555;
+  color: #fff;
+  text-align: center;
+  border-radius: 6px;
+  padding: 8px 0;
+  position: absolute;
+  z-index: 1;
+  bottom: 125%;
+  left: 50%;
+  margin-left: -80px;
+}
+.assessment-popup .assessment-popuptext::after {
+  content: "";
+  position: absolute;
+  top: 100%;
+  left: 50%;
+  margin-left: -5px;
+  border-width: 5px;
+  border-style: solid;
+  border-color: #555 transparent transparent transparent;
+}
+.assessment-popup:hover .assessment-popuptext {
+  visibility: visible;
+  -webkit-animation: fadeIn 1s;
+  animation: fadeIn 1s;
+}
+@-webkit-keyframes fadeIn {
+  from {opacity: 0;} 
+  to {opacity: 1;}
+}
+@keyframes fadeIn {
+  from {opacity: 0;}
+  to {opacity:1 ;}
+}
+.assessment-empty-output {
+  height: 1.5rem;
+  width: 1.5rem;
+}

+ 3 - 0
ivprog_contexto/css/ivprog-editor.css

@@ -0,0 +1,3 @@
+.CodeMirror {
+  height: 100% !important;
+}

+ 148 - 11
ivprog_contexto/css/ivprog-term.css

@@ -1,20 +1,32 @@
 .ivprog-term-div {
-  background-color: black;
+  /* background-color: black; */
   width: 100%;
   height: 12rem;
   overflow-y: scroll;
 }
 
+#ivprog-term-div {
+  z-index: 10;
+}
+
 .ivprog-term-userText {
-  color: white;
+  white-space: pre;
+  height: 1.6rem;
+}
+
+.ivprog-term-userText, .ivprog-term-userInput {
+  color: #f2d6d6;
+  height: 1.6rem;
 }
 
 .ivprog-term-info {
-  color: green;
+  color: #28a628;
+  height: 1.6rem;
 }
 
 .ivprog-term-error {
-  color: red;
+  color: #df4242;
+  height: 1.6rem;
 }
 
 .ivprog-term-input {
@@ -31,16 +43,17 @@
 }
 
 #ivprog-term {
-  border: 1px solid gray;
+  /* border: 1px solid gray;
   background: black;
   margin-top: -30px;
   position: relative;
   padding: 5px;
+  z-index: 999; */
 }
-#ivprog-term i {
+/* #ivprog-term i {
   margin-left: 5px;
   cursor: pointer;
-}
+} */
 .div_toggle_console {
   cursor: pointer;
 }
@@ -56,16 +69,140 @@
 .ivprog-term-div::-webkit-scrollbar {
     width: 12px;
 }
- 
+
 .ivprog-term-div::-webkit-scrollbar-track {
-    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
+    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
     -webkit-border-radius: 10px;
     border-radius: 10px;
 }
- 
+
 .ivprog-term-div::-webkit-scrollbar-thumb {
     -webkit-border-radius: 10px;
     border-radius: 10px;
     background: green;
-    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
+    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
+}
+
+/**novas regras bash*/
+#ivprog-terminal-inputdiv {
+  padding-left: 12px;
+}
+#ivprog-console-clearbtn, #ivprog-console-showbtn, #ivprog-console-hidebtn {
+  cursor: pointer;
+}
+
+.bash {
+  box-shadow: 0 0 30px rgba(0,0,0,0.4);
+  border-radius: 3px;
+  font-family: "Andale Mono", Consolas, "Courier New" !important;
+}
+
+.bash-title {
+  text-align: center;
+  color: #525252;
+  padding: 5px 0;
+  margin: 0;
+  text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
+  font-size: 0.85em;
+  border: 1px solid #CCCCCC;
+  border-bottom: none;
+
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
+
+  background: #f7f7f7; /* Old browsers */
+  background: linear-gradient(to bottom,  #f7f7f7 0%,#B8B8B8 100%); /* W3C */
+}
+
+.bash-body {
+  /* margin: 0;
+  padding: 5px; */
+  background: #111010;
+  /* list-style: none; */
+  color: #F8F8FF;
+
+  font: 14px 'Andale Mono', Consolas, 'Courier New';
+  line-height: 1.6em;
+  border: 1px solid #CCCCCC;
+  border-bottom-right-radius: 3px;
+  border-bottom-left-radius: 3px;
+}
+
+.bash-text {
+  font: 14px 'Andale Mono', Consolas, 'Courier New';
+  line-height: 1.6em;
+}
+
+.bash-highlight {
+  color: #45D40C;
+}
+
+.bash-highlight a {
+  color: #45D40C;
+  text-decoration: underline;
+}
+
+/* .bash-body li:before {
+  content: '$';
+  color: #F8F8FF;
+  position: absolute;
+  left: 0;
+  top: 0;
+} */
+
+.bash-body i {
+  cursor: text;
+}
+
+.bash-body li {
+  word-wrap: break-word;
+  position: relative;
+  padding: 0 0 0 15px;
+}
+
+#cmd {
+  font-family: courier;
+  font-size: 14px;
+  line-height: normal;
+  background:inherit;
+  color: #21f838;
+  padding: 5px;
+  overflow: hidden;
+}
+#cmd span {
+  float: left;
+  padding-left: 3px;
+  white-space: pre;
+}
+#cursor {
+  float: left;
+  width: 5px;
+  height: 14px;
+  background: #21f838;
+}
+#cmd ~ input {
+  width: 0;
+  height: 0;
+  opacity: 0;
+}
+
+.ivprog-term-error > span > ul {
+  margin:0 !important;
+}
+
+.ivprog-term-error > span > ul > li {
+  padding: 0;
+  margin: 0;
+  line-height: 1rem;
+}
+
+.assessment-div-detail:hover {
+  cursor: pointer;
+}
+.assessment-div-detail:hover > span {
+  text-decoration: underline;
+}
+
+.bash span {
+  font-family: 'Courier New', Courier, monospace;
 }

+ 338 - 37
ivprog_contexto/css/ivprog-visual-1.0.css

@@ -16,8 +16,14 @@ body {
 
 .ivprog_visual_panel {
 	height: 96%;
-	/*overflow: auto;
-	overflow-x: auto;*/
+	overflow: auto;
+	overflow-x: auto;
+}
+
+.ivprog_textual_panel {
+	height: 95%;
+	overflow: auto;
+	overflow-x: auto;
 }
 
 .ivprog_textual_code {
@@ -132,17 +138,6 @@ body {
 	margin-right: 10px;
 }
 
-.case_commands_block {
-	/*border: 1px solid red;*/
-}
-
-.context_menu {
-	display: inline;
-	float: right; 
-	margin-right: 25px;
-	margin-top: -4px;
-}
-
 .case_div {
 	border: 1px solid gray;
 	margin-left: 30px;
@@ -154,7 +149,7 @@ body {
 .expression_operand_1, .expression_operand_2, .operator, .div_comment_text, .value_rendered, .parameters_function_called, .parameters_function_called div, .expression_elements,
 .expression_element, .var_rendered, .menu_add_item, .component_element, .component_element, .conditional_expression, .variable_attribution, .attribution_expression, .var_value_expression,
 .incrementation_field, .incrementation_variable, .first_operand, .operator, .second_operand, .variable_to_switch, .variable_case, .button_remove_case, .editing_name_var, .parameter_div_edit,
-.all_elements_write, .container_var_element_control, .inline_add_command, .restart_expression, .div_parent_handler, .div_drag_writer {
+.all_elements_write, .container_var_element_control, .inline_add_command, .restart_expression, .div_parent_handler, .div_drag_writer, .single_element_expression, .ghost_parenthesis, .pass_button {
 	display: inline;
 }
 
@@ -289,6 +284,7 @@ div.buttons_manage_columns {
 }
 .ui.repeatNtimes .separator_character {
 	margin-right: 10px;
+	margin-left: 15px;
 }
 .ui.repeatNtimes, .ui.whiletrue {
     min-height: 50px;
@@ -384,9 +380,6 @@ div.buttons_manage_columns {
 	padding: 3px;
 }
 
-.ui.button_add_case {
-	margin-top: 10px;
-}
 .accordion {
 	margin: auto;
 }
@@ -478,8 +471,10 @@ div.function_name_div_updated:active,
 }
 
 .character_equals {
-	vertical-align: sub;
     font-size: 150%;
+    display: inline;
+    margin-left: 3px;
+    margin-right: -2px;
 }
 
 .yellow.icon.times.remove_global,
@@ -559,7 +554,9 @@ div.function_name_div_updated:active,
 .incrementation_field .incrementation_variable,
 .incrementation_field .first_operand:not(:empty),
 .incrementation_field .operator:not(:empty),
-.incrementation_field .second_operand:not(:empty) {
+.incrementation_field .second_operand:not(:empty),
+.single_element_expression, .ghost_parenthesis,
+.ui.repeatNtimes .conditional_expression {
 	background: #e8e8e8;
 	border-radius: 5px;
 	min-width: 40px;
@@ -647,27 +644,25 @@ div.function_name_div_updated:active,
 
 .global_var .circle.add_global_button, .global_var i.back,
 .ui.add_var_context .icon.plus.circle, .ui.add_var_context .icon.circle.back,
-.ui.inline_add_command .icon.plus.circle, .ui.inline_add_command .icon.circle.back {
+.ui.rail .icon.plus.circle, .ui.rail .icon.circle.back {
 	position: absolute;
 }
 .global_var .circle.add_global_button,
 .ui.add_var_context .icon.plus.circle,
-.inline_add_command .icon.plus.circle {
-	z-index: 10;
+.ui.rail .icon.plus.circle {
 	color: #bf80d4!important;
 	cursor: pointer;
 	font-style: 120%;
 }
 .global_var i.back,
 .ui.add_var_context .icon.circle.back,
-.inline_add_command .icon.circle.back {
-	z-index: 9;
+.ui.rail .icon.circle.back {
 	color: white !important;
 }
 .ui.add_var_context{
 	margin-left: -4px;
 }
-.inline_add_command {
+.ui.rail {
 	color: #ab0054 !important;
 }
 
@@ -692,6 +687,7 @@ div.function_name_div_updated:active,
 .global_container .span_value_variable,
 .variable_container .span_value_variable {
     font-size: 110%;
+    white-space: pre;
 }
 .global_container .global_type, .global_container .editing_name_var, .global_container .span_value_variable,
 .variable_container .variable_type,  .variable_container .span_value_variable, .variable_container .editing_name_var,
@@ -713,11 +709,11 @@ div.function_name_div_updated:active,
 	color: yellow;
 	font-size: 125%;
 }
-.inline_add_command .icon.plus.circle {
+.ui.rail .icon.plus.circle {
 	color: #ec9962 !important;
 }
-.inline_add_command .icon.plus.circle, 
-.inline_add_command .icon.circle.back,
+.ui.rail .icon.plus.circle, 
+.ui.rail .icon.circle.back,
 .ui.add_var_context .icon.plus.circle, 
 .ui.add_var_context .icon.circle.back,
 .global_var .icon.plus.circle, 
@@ -725,8 +721,13 @@ div.function_name_div_updated:active,
 	left: 1.8em !important;
 	margin-top: 1.5em !important;
 }
+
+.ui.rail .icon.plus.circle, 
+.ui.rail .icon.circle.back {
+	left: 1.3em !important;
+}
+
 .ui.icon.button.dropdown.menu_commands {
-    float: left;
     color: white;
     margin-left: -4px;
     padding: 8px;
@@ -795,14 +796,6 @@ div.ui.checkbox.transition.visible {
     color: white !important;
     border: 2px solid #3125ee;
 }
-.ui.comment:hover, .ui.reader:hover, .ui.writer:hover, .ui.attribution:hover, .ui.functioncall:hover,
-.ui.return:hover {
-    background: #f2e67f;
-}
-
-.ui.iftrue:hover, .ui.repeatNtimes:hover, .ui.whiletrue:hover, .ui.dowhiletrue:hover, .ui.switch:hover {
-	background: #c6c8f2;
-}
 
 .ui.iftrue, .ui.repeatNtimes, .ui.whiletrue, .ui.dowhiletrue, .ui.switch {
     background: #787fe721;
@@ -860,4 +853,312 @@ div.ui.checkbox.transition.visible {
 .ui.block_commands {
     min-height: 20px !important;
     padding-top: 5px !important;
+}
+
+.ghost_div {
+    height: 20px;
+    background-color: #ffffff;
+    margin: 5px;
+    border: 2px dotted #000000;
+    box-shadow: 1px 1px;
+    height: 28px;
+    border: 2px solid green;
+}
+.ghost_element, .ghost_parenthesis {
+	opacity: 0;
+}
+.expression_elements:hover .ghost_element, .expression_elements:hover .ghost_parenthesis {
+	
+}
+.ghost_element:hover, .ghost_parenthesis:hover {
+	opacity: 1.0 !important;
+}
+
+.usepointer, .ghost_element, .ghost_parenthesis, .add_parentheses {
+	cursor: pointer !important;
+}
+
+.add_parentheses {
+	margin-left: 20px;
+}
+
+.temp_class {
+	opacity: 0;
+}
+
+.parentheses_ghost {
+	display: inline;
+	background-color: #2ecc40;
+	padding: 1px 4px;
+    font-size: 120%;
+    padding-bottom: 2px;
+    font-weight: bold;
+    margin: 0px 4px;
+    border-radius: 4px;
+    box-shadow: 4px black;
+    box-shadow: 1px 1px;
+    border: 1px solid gray;
+}
+
+.single_element_expression {
+	
+}
+
+.floating_parenthesis {
+	padding: 3px 2px;
+    border: 1px solid gray;
+    background-color: #e8e8e8;
+    width: 30px;
+    text-align: center;
+    border-radius: 5px;
+    font-weight: bold;
+    box-shadow: 2px 2px grey;
+}
+
+.remove_element_expression {
+	display: inline;
+	position: absolute;
+    top: -15px;
+    right: -5px;
+}
+
+.mouse_distance {
+
+}
+
+.mouse_distance_hidden {
+	display: none !important;
+}
+
+.mouse_distance_except {
+	display: inline !important;
+}
+
+.higher_element {
+	display: inline;
+	min-width: 10px !important;
+	min-height: 10px;
+
+    position: absolute;
+    margin-left: -10px;
+    margin-top: -5px;
+    padding-left: 5px;
+}
+
+.ghost_element {
+    border: 2px solid green !important;
+    box-shadow: #8f8f8f 2px 2px !important;
+    background: #d8ffd8 !important;
+}
+
+.ui.button.green.add_expression {
+	padding: 2px;
+    padding-top: 5px;
+    padding-bottom: 5px;
+    margin-left: 5px;
+    padding-left: 10px;
+}
+.ui.button.green.add_expression i {
+	font-size: 110%;
+}
+.simple_add {
+	display: inline;
+}
+.lixeira {
+	position: absolute;
+	top: 300px;
+	left: 200px;
+	height: 100px;
+	background-image: url('../img/trash-icon.png');
+	width: 125px !important;
+    background-position: 0;
+    background-repeat: no-repeat;
+    display: none;
+}
+.lixeira .trash {
+	font-size: 3em;
+}
+.color_test {
+	background-color: green;
+}
+.parentheses_fixed {
+	background-color: #617063 !important;
+	color: white !important;
+}
+.parentheses_in_expression {
+	cursor: pointer;
+}
+
+.ivprog-error-varname {
+	font-style: italic;
+	margin-left: 1px;
+	margin-right: 1px;
+}
+
+.disabled {
+	pointer-events: none;
+}
+
+.dimmer_content_message {
+	color: white;
+	display: none;
+}
+
+.circular.inverted.teal.question.icon {
+	font-size: 12px;
+	margin-left: 10px;
+}
+
+.table_buttons {
+	width: 100%;
+	margin-top: 10px;
+}
+.table_buttons .right_align {
+	text-align: right;
+}
+.text_area_output, .text_area_input {
+	width: 80%;
+}
+.tabular .item {
+	font-size: 1.1em;
+}
+.tabular.menu {
+	margin-top: 1em !important;
+}
+.ui.bottom.attached.tab.segment, .tabular.menu {
+	margin-left: 1em !important;
+	margin-right: 1em !important;
+}
+
+.ui.blue.table thead tr:first-child > th {
+     position: sticky !important;
+     top: 0;
+     z-index: 2;
+}
+
+.ui.bottom.attached.tab.segment.tab_algorithm {
+	height: 90%;
+}
+
+.ui.segment.settings_topic h3 {
+	margin-bottom: 20px;
+}
+
+.settings_topic .content_segment_settings {
+	margin-left: 40px;
+}
+
+.ui.repeatNtimes .span_command_spec {
+	margin-right: 10px;
+}
+
+.ui.repeatNtimes .ui.attribution_expression {
+	margin-right: -10px;
+}
+
+.ui.repeatNtimes .ui.var_value_expression.div_expression_st {
+	margin-left: -10px;
+}
+
+.pass_button {
+	margin-left: 10px;
+}
+
+.pass_button button {
+	padding-bottom: 2px;
+}
+
+/* Write newline button*/
+.ivprog_newline_btn {
+  position: absolute;
+  height: 32px;
+  cursor: pointer;
+}
+
+.ui.icon.button.minimize_block_button {
+	background: none;
+	float: right;
+	padding-top: .25rem;
+	margin-right: .3rem;
+}
+
+div.ui.dropdown.menu_commands.pause {
+
+}
+
+.context_menu {
+	display: inline;
+	margin-left: 1rem;
+}
+
+.data_block_if span.textual_expression,
+.ui.dowhiletrue span.textual_expression,
+.ui.whiletrue span.textual_expression,
+.attribution span.textual_expression,
+.writer span.textual_expression,
+.return span.textual_expression {
+	color: #2325a6;
+	font-weight: bold;
+	font-size: 1.2rem;
+}
+
+i.button_alternate_expression {
+	cursor: pointer;
+	font-size: 1.1rem;
+	margin-left: 0.3rem;
+	color: black;
+}
+
+.attribution i.button_alternate_expression {
+	margin-left: .8rem;
+}
+.repeatN_text_par_1, .repeatN_text_par_2, 
+.repeatN_text_par_3, .repeatN_text_par_4 {
+	margin-left: .2rem;
+	font-weight: bold;
+	font-size: 1.2rem;
+	margin-right: .3rem;
+	color: #2325a6;
+}
+
+.repeatN_text_par_1 {
+	margin-left: -1.2rem;
+}
+
+.writer .button_alternate_expression {
+	margin-left: 2.5rem;
+}
+
+.ui.dropdown.menu_commands.pause button {
+	border: none;
+	background: #f2711c;
+	color: white;
+	border-radius: .2rem;
+	padding: .1rem;
+	padding-left: 0.1rem;
+	font-size: .9rem;
+	padding-left: .25rem;
+	cursor: pointer;
+	margin-top: .15rem;
+}
+
+.button_write_expression {
+	cursor: pointer;
+	margin-left: 1rem !important;
+}
+
+.input-expression-field {
+	width: 50%;
+}
+
+.expression-edit-confirm {
+	color: #32a852;
+	font-size: 1.2rem !important;
+	cursor: pointer;
+	margin-left: 1rem !important;
+  margin-right: 1rem !important;
+}
+
+.expression-edit-cancel {
+	cursor: pointer;
 }

+ 56 - 0
ivprog_contexto/css/roboto.css

@@ -0,0 +1,56 @@
+/* cyrillic-ext */
+@font-face {
+  font-family: 'Roboto';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Roboto'), local('Roboto-Regular'), url(fonts/cyrillic-ext-roboto.woff2) format('woff2');
+  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
+}
+/* cyrillic */
+@font-face {
+  font-family: 'Roboto';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Roboto'), local('Roboto-Regular'), url(fonts/cyrillic-roboto.woff2) format('woff2');
+  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
+/* greek-ext */
+@font-face {
+  font-family: 'Roboto';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Roboto'), local('Roboto-Regular'), url(fonts/greek-ext-roboto.woff2) format('woff2');
+  unicode-range: U+1F00-1FFF;
+}
+/* greek */
+@font-face {
+  font-family: 'Roboto';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Roboto'), local('Roboto-Regular'), url(fonts/greek-roboto.woff2) format('woff2');
+  unicode-range: U+0370-03FF;
+}
+/* vietnamese */
+@font-face {
+  font-family: 'Roboto';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Roboto'), local('Roboto-Regular'), url(fonts/vietnamese-roboto.woff2) format('woff2');
+  unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
+}
+/* latin-ext */
+@font-face {
+  font-family: 'Roboto';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Roboto'), local('Roboto-Regular'), url(fonts/latin-ext-roboto.woff2) format('woff2');
+  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+/* latin */
+@font-face {
+  font-family: 'Roboto';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Roboto'), local('Roboto-Regular'), url(fonts/latin-roboto.woff2) format('woff2');
+  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 66 - 58
ivprog_contexto/js/semantic/semantic.min.css


+ 36 - 0
ivprog_contexto/css/show-hint.css

@@ -0,0 +1,36 @@
+.CodeMirror-hints {
+  position: absolute;
+  z-index: 10;
+  overflow: hidden;
+  list-style: none;
+
+  margin: 0;
+  padding: 2px;
+
+  -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
+  -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
+  box-shadow: 2px 3px 5px rgba(0,0,0,.2);
+  border-radius: 3px;
+  border: 1px solid silver;
+
+  background: white;
+  font-size: 90%;
+  font-family: monospace;
+
+  max-height: 20em;
+  overflow-y: auto;
+}
+
+.CodeMirror-hint {
+  margin: 0;
+  padding: 0 4px;
+  border-radius: 2px;
+  white-space: pre;
+  color: black;
+  cursor: pointer;
+}
+
+li.CodeMirror-hint-active {
+  background: #08f;
+  color: white;
+}

+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/brand-icons.eot


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/brand-icons.svg


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/brand-icons.ttf


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/brand-icons.woff


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/brand-icons.woff2


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.eot


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.otf


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.svg


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.ttf


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.woff


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/icons.woff2


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/outline-icons.eot


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/outline-icons.svg


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/outline-icons.ttf


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/outline-icons.woff


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/fonts/outline-icons.woff2


+ 0 - 0
ivprog_contexto/js/semantic/themes/default/assets/images/flags.png


+ 64 - 0
ivprog_contexto/css/ttcn.css

@@ -0,0 +1,64 @@
+.cm-s-ttcn .cm-quote { color: #090; }
+.cm-s-ttcn .cm-negative { color: #d44; }
+.cm-s-ttcn .cm-positive { color: #292; }
+.cm-s-ttcn .cm-header, .cm-strong { font-weight: bold; }
+.cm-s-ttcn .cm-em { font-style: italic; }
+.cm-s-ttcn .cm-link { text-decoration: underline; }
+.cm-s-ttcn .cm-strikethrough { text-decoration: line-through; }
+.cm-s-ttcn .cm-header { color: #00f; font-weight: bold; }
+
+.cm-s-ttcn .cm-atom { color: #219; }
+.cm-s-ttcn .cm-attribute { color: #00c; }
+.cm-s-ttcn .cm-bracket { color: #997; }
+.cm-s-ttcn .cm-comment { color: #333333; }
+.cm-s-ttcn .cm-def { color: #00f; }
+.cm-s-ttcn .cm-em { font-style: italic; }
+.cm-s-ttcn .cm-error { color: #f00; }
+.cm-s-ttcn .cm-hr { color: #999; }
+.cm-s-ttcn .cm-invalidchar { color: #f00; }
+.cm-s-ttcn .cm-keyword { font-weight:bold; }
+.cm-s-ttcn .cm-link { color: #00c; text-decoration: underline; }
+.cm-s-ttcn .cm-meta { color: #555; }
+.cm-s-ttcn .cm-negative { color: #d44; }
+.cm-s-ttcn .cm-positive { color: #292; }
+.cm-s-ttcn .cm-qualifier { color: #555; }
+.cm-s-ttcn .cm-strikethrough { text-decoration: line-through; }
+.cm-s-ttcn .cm-string { color: #006400; }
+.cm-s-ttcn .cm-string-2 { color: #f50; }
+.cm-s-ttcn .cm-strong { font-weight: bold; }
+.cm-s-ttcn .cm-tag { color: #170; }
+.cm-s-ttcn .cm-variable { color: #8B2252; }
+.cm-s-ttcn .cm-variable-2 { color: #05a; }
+.cm-s-ttcn .cm-variable-3, .cm-s-ttcn .cm-type { color: #085; }
+
+.cm-s-ttcn .cm-invalidchar { color: #f00; }
+
+/* ASN */
+.cm-s-ttcn .cm-accessTypes,
+.cm-s-ttcn .cm-compareTypes { color: #27408B; }
+.cm-s-ttcn .cm-cmipVerbs { color: #8B2252; }
+.cm-s-ttcn .cm-modifier { color:#D2691E; }
+.cm-s-ttcn .cm-status { color:#8B4545; }
+.cm-s-ttcn .cm-storage { color:#A020F0; }
+.cm-s-ttcn .cm-tags { color:#006400; }
+
+/* CFG */
+.cm-s-ttcn .cm-externalCommands { color: #8B4545; font-weight:bold; }
+.cm-s-ttcn .cm-fileNCtrlMaskOptions,
+.cm-s-ttcn .cm-sectionTitle { color: #2E8B57; font-weight:bold; }
+
+/* TTCN */
+.cm-s-ttcn .cm-booleanConsts,
+.cm-s-ttcn .cm-otherConsts,
+.cm-s-ttcn .cm-verdictConsts { color: #006400; }
+.cm-s-ttcn .cm-configOps,
+.cm-s-ttcn .cm-functionOps,
+.cm-s-ttcn .cm-portOps,
+.cm-s-ttcn .cm-sutOps,
+.cm-s-ttcn .cm-timerOps,
+.cm-s-ttcn .cm-verdictOps { color: #0000FF; }
+.cm-s-ttcn .cm-preprocessor,
+.cm-s-ttcn .cm-templateMatch,
+.cm-s-ttcn .cm-ttcn3Macros { color: #27408B; }
+.cm-s-ttcn .cm-types { color: #A52A2A; font-weight:bold; }
+.cm-s-ttcn .cm-visibilityModifiers { font-weight:bold; }

+ 0 - 86
ivprog_contexto/i18n/en/error.json

@@ -1,86 +0,0 @@
-{
-  "token_missing_one": "Erro de sintaxe: Espera-se $0, mas encontrou-se $1 na linha:$2, coluna:$3",
-  "token_missing_two": "Erro de sintaxe: Esperava-se $0 ou $1 mas encontrou-se $2 na liha:$3, coluna: $4",
-  "eos_missing": "Falta uma nova linha ou ; na linha: $0, coluna: $1",
-  "invalid_type": "$0 na linha: $1, coluna: $2 é um tipo inválido. Os tipos válidos são: $3",
-  "invalid_array_dimension": "A dimensão inválida na linha: $0, coluna: $1. Insira um $2 ou identificador válido do mesmo tipo.",
-  "invalid_array_size": "O tamnho do vetor/matriz excede o máximo de 2 na linha $0",
-  "extra_lines": "Nenhum texto é permitido após '}' em 'programa {...}'",
-  "invalid_main_return": "A função $0 deve retornar $1 na linha $2",
-  "invalid_var_declaration": "Erro na linha $0. Variáveis só podem ser declarados no corpo principal da função e de preferência nas primeiras linhas.",
-  "invalid_break_command": "Erro na linha $0. O comando $1 não pode ser usado fora de uma estrutura de repetição ou 'escolha...caso'",
-  "invalid_terminal": "Não é possível utilizar $0 na expressão da linha: $1, coluna: $2. Tente um valor númerico, variável ou chamada de função.",
-  "const_not_init": "Erro na linha: $0, coluna: $1. Uma variável declarada como const deve ser inicializada",
-  "id_missing": "Esperava-se um identificador, mas encontrou-se $0 na linha: $1, coluna: $2",
-  "invalid_id_format": "$0 na linha: $1, coluna: $2 não é um identificador válido. O símbolo '.' não é permitido neste contexto.",
-  "main_missing": "A função principal não foi encontrada",
-  "invalid_global_var": "Erro crítico: Chamada inválida da função initGlobal fora do contexto BASE",
-  "not_implemented": "Erro interno crítico: A função definida pelo sistema $0 não foi implementada.",
-  "function_missing": "A função $0 não foi encontrada",
-  "function_missing_full": "A função $0 na linha: $1, coluna: $2 não foi encontrada",
-  "invalid_parameters_size_full": "Erro na linha $0: a quantidade de parâmetros fornecidos à função $1 está incorreta. Esperava-se $2, encontrou-se $3.",
-  "invalid_parameters_size": "A quantidade de parâmetros fornecidos à função $0 está incorreta. Esperava-se $1, encontrou-se $2",
-  "invalid_ref_full": "A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é válida para esta função. Use uma variável ou posição de vetor.",
-  "invalid_ref": "A expressão $0 fornecida como parâmetro para a função $1 não é válida para esta função. Use uma variável ou posição de vetor.",
-  "invalid_parameter_type_full": "A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é compatível com o tipo esperado.",
-  "invalid_parameter_type": "A expressão $0 fornecida como parâmetro para a função $1 não é compatível com o tipo esperado.",
-  "unknown_command_full": "Erro interno crítico: comando desconhecido encontrado na linha $0",
-  "unknown_command": "Erro interno crítico: comando desconhecido encontrado!",
-  "loop_condition_type_full": "Erro na linha: $0, coluna $1: a condição dos laços de repetição deve ser do tipo lógico",
-  "loop_condition_type": "A condição dos laços de repetição deve ser do tipo lógico",
-  "endless_loop_full": "Possível laço infinito detectado no seu código. Verifique a linha $0",
-  "endless_loop": "Possível laço infinito detectado no seu código.",
-  "for_condition_type_full": "Erro na linha: $0, coluna $1: a condição de parada do comando para(...) deve ser do tipo lógico",
-  "for_condition_type": "A condição de parada do comando para(...) deve ser do tipo lógico",
-  "if_condition_type_full": "Erro na linha: $0, coluna $1: a condição de um comando se...senao deve ser do tipo lógico",
-  "if_condition_type": "A condição de um comando se...senao deve ser do tipo lógico",
-  "invalid_return_type_full": "Erro na linha $0: a expressão não produz um tipo compatível com a função $1. Tipo esperado: $2.",
-  "invalid_return_type": "A expressão não produz um tipo compatível com a função $0. Tipo esperado: $1.",
-  "invalid_void_return_full": "Erro na linha $0: a função $1 não pode retornar uma expressão vazia, use uma espressão do tipo $2",
-  "invalid_void_return": "A função $0 não pode retornar uma expressão vazia, use uma espressão do tipo $1",
-  "unexpected_break_command_full": "Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso na linha $0",
-  "unexpected_break_command": "Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso",
-  "invalid_dimension": "As dimensões de um vetor/matriz devem ser do tipo inteiro",
-  "void_in_expression_full": "Erro na linha: $0, coluna: $1: a função $2 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio",
-  "void_in_expression": "A função $0 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio",
-  "invalid_array_access_full": "Identificador $0 na linha: $1, coluna: $2 não se refere a um vetor/matriz válido",
-  "invalid_array_access": "Identificador $0 não se refere a um vetor/matriz válido",
-  "invalid_matrix_access_full": "Identificador $0 na linha: $1, coluna: $2 não se refere a uma matriz válida",
-  "invalid_matrix_access": "Identificador $0 não se refere a uma matriz válida",
-  "matrix_column_outbounds_full": "Erro na linha $0: número de colunas $1 é inválido para a matriz $2 que possui $3 colunas",
-  "matrix_column_outbounds": "Número de colunas $0 é inválido para a matriz $1 que possui $2 colunas",
-  "matrix_line_outbounds_full": "Erro na linha $0: número de linhas $1 é inválido para a matriz $2 que possui $3 linhas",
-  "matrix_line_outbounds": "Número de linhas $0 é inválido para a matriz $1 que possui $2 linhas",
-  "vector_line_outbounds_full": "Erro na linha $0: número de linhas $1 é inválido para a matriz $2 que possui $3 linhas",
-  "vector_line_outbounds": "Número de linhas $0 é inválido para a matriz $1 que possui $2 linhas",
-  "vector_not_matrix_full": "Erro na linha $0: $1 não é uma matriz",
-  "vector_not_matrix": "$1 não é uma matriz",
-  "invalid_infix_op_full": "Erro na linha $0: não é possível aplicar a operação $1 entre os tipos $2 e $3",
-  "invalid_infix_op": "Não é possível aplicar a operação $0 entre os tipos $1 e $2",
-  "invalid_unary_op_full": "Erro na linha $0: não é possível aplicar a operação $1 ao tipo $2",
-  "invalid_unary_op": "Não é possível aplicar a operação $0 ao tipo $1",
-  "unknown_op": "Erro interno crítico: Operação $0 desconhecida",
-  "duplicate_function": "A função $0 na linha: $1, coluna: $2 já foi definida anteriormente.",
-  "duplicate_variable": "A variável $0 na linha: $1, coluna: $2 já foi declarada anteriormente.",
-  "main_parameters": "A função inicio não pode ter parâmetros.",
-  "symbol_not_found_full": "A variável $0 na linha: $1, coluna: $2 não foi declarada",
-  "symbol_not_found": "A variável $0 não foi declarada",
-  "array_dimension_not_int_full": "As dimensões de um vetor/matriz na linha: $0 devem ser do tipo inteiro.",
-  "array_dimension_not_int": "As dimensões de um vetor/matriz devem ser do tipo inteiro.",
-  "array_dimension_not_positive_full": "As dimensões de um vetor/matriz na linha: $0 devem ser valores positivos.",
-  "array_dimension_not_positive": "As dimensões de um vetor/matriz devem ser valores positivos.",
-  "incompatible_types_full": "O tipo $0 não é compatível com o tipo resultante da expressão na linha $1",
-  "incompatible_types": "O tipo $0 não é compatível com o tipo resultante da expressão fornecida.",
-  "incompatible_types_array_full": "A expressão $0 é incompatível com o tipo $1 na linha: $2, coluna: $3.",
-  "incompatible_types_array": "A expressão $0 é incompatível com o tipo $1.",
-  "invalid_case_type_full": "O caso $0 na linha $1 é incompatível com o tipo $2.",
-  "invalid_case_type": "O caso $0 é incompatível com o tipo $1.",
-  "function_no_return": "A função $0 não possui um retorno acessível. Toda função deve ter ao menos um retorno no seu corpo principal.",
-  "invalid_array_literal_type_full": "Erro na linha $0: a expressão $1 não resulta em um tipo compatível.",
-  "invalid_array_literal_type": "A expressão $0 não resulta em um tipo compatível.",
-  "invalid_array_literal_line_full": "Erro na linha $0: esperava-se $1 linhas mas encontrou $2.",
-  "invalid_array_literal_line": "Esperava-se $0 linhas mas encontrou $1.",
-  "invalid_array_literal_column_full": "Erro na linha $0: esperava-se $1 colunas mas encontrou $2.",
-  "invalid_array_literal_column": "Esperava-se $0 colunas mas encontrou $1.",
-  "exceeded_input_request": "The amount of requests exceeded the amount of available inputs"
-}

+ 0 - 9
ivprog_contexto/i18n/en/index.js

@@ -1,9 +0,0 @@
-import errors from './error.json';
-import messages from './message.json'
-import ui from './ui.json';
-
-export default {
- 'message' : messages,
- 'error': errors,
- 'ui': ui
-}

+ 0 - 3
ivprog_contexto/i18n/en/message.json

@@ -1,3 +0,0 @@
-{
-  
-}

+ 0 - 135
ivprog_contexto/i18n/en/ui.json

@@ -1,135 +0,0 @@
-{
-  "function": "function",
-  "btn_clear": "Clear",
-  "btn_function": "Function",
-  "btn_arithmetic_plus": "Sum",
-  "btn_arithmetic_minus": "Minus",
-  "btn_arithmetic_multiplication": "Multiplication",
-  "btn_arithmetic_division": "Division",
-  "btn_arithmetic_module": "Module",
-  "btn_break":"Break",
-  "btn_case":"Case",
-  "start": "start",
-  "void": "void",
-  "integer": "integer",
-  "real": "real",
-  "program": "program",
-  "text": "string",
-  "text_start": "text",
-  "boolean": "boolean",
-  "true": "true",
-  "false": "false",
-  "variable": "Variable",
-  "command": "Command",
-  "new_parameter": "new_parameter",
-  "new_variable": "new_variable",
-  "new_global": "new_global",
-  "new_function": "new_function",
-  "vector": "vector",
-  "text_comment_start": "Initial comment of function...",
-  "text_comment_main": "This is the main function...",
-  "text_read_var": "Reading data",
-  "text_write_var": "Writing data",
-  "text_command_read":"read",
-  "text_command_write":"write",
-  "text_comment": "Comment",
-  "text_attribution": "Attribution",
-  "text_if":"if",
-  "text_else":"else",
-  "text_break":"break",
-  "text_for":"for",
-  "text_code_while":"while",
-  "text_code_do":"do",
-  "text_command_do":"do",
-  "text_code_switch": "switch",
-  "text_code_case": "case",
-  "text_logic_expression": "Logic Expression",
-  "text_arithmetic_expression": "Relational Expression",
-  "text_iftrue": "If true then",
-  "text_receives": "receives",
-  "text_repeatNtimes": "Repeat N times",
-  "text_return":"return",
-  "text_btn_return":"Return",
-  "text_whiletrue": "While true",
-  "text_dowhiletrue": "Do while true",
-  "text_switch": "Switch",
-  "text_functioncall": "Function call",
-  "text_value": "Value",
-  "text_operator": "Operator",
-  "text_parentheses": "Parentheses",
-  "text_change": "Change",
-  "text_teacher_algorithm": "Algorithm",
-  "text_teacher_algorithm_include": "Include the following algorithm in exercise",
-  "text_teacher_test_case": "Test cases",
-  "text_teacher_config": "Settings",
-  "text_teacher_data_types": "Data types",
-  "text_teacher_commands": "Commands",
-  "text_teacher_functions": "Functions",
-  "text_teacher_create_functions": "Create new functions",
-  "text_teacher_create_movement_functions": "Move functions",
-  "text_teacher_test_case_input": "Input",
-  "text_teacher_test_case_output": "Output",
-  "text_teacher_test_case_actions": "Actions",
-  "text_teacher_test_case_add": "Add test cases",
-  "text_header_ivprog_functions": "iVProg Functions",
-  "text_menu_functions_math":"Mathematic",
-  "text_menu_functions_text":"Text",
-  "text_menu_functions_arrangement":"Arrangement",
-  "text_menu_functions_conversion":"Conversion",
-  "text_none_variable":"There is no declared variable",
-  "text_none_variable_instruction":"Create a new variable to use it",
-  "text_ivprog_description":"Interactive Visual Programming on the Internet",
-  "tooltip_visual": "Visual programming",
-  "tooltip_textual": "Textual programming",
-  "tooltip_upload": "Upload code file",
-  "tooltip_download": "Download code file",
-  "tooltip_undo": "Undo",
-  "tooltip_redo": "Redo",
-  "tooltip_run": "Run program",
-  "tooltip_evaluate": "Evaluate program",
-  "tooltip_help": "Help",
-  "tooltip_add_global": "Add global variable",
-  "tooltip_minimize": "Hidde function elements",
-  "tooltip_console": "Open/Close console",
-  "var_menu_select_var": "Select a var",
-  "var_menu_select_all": "Select",
-  "var_menu_select_function": "Select a function",
-  "expression_menu_select": "Construct any logical condition",
-  "math": "Mathematic",
-  "text_t": "Text",
-  "inform_valid_name": "Inform a valid name!",
-  "inform_valid_content": "Enter some content!",
-  "inform_valid_expression": "Construct the logical condition!",
-  "inform_valid_name_duplicated": "This name is already in use by other function.",
-  "inform_valid_global_duplicated": "A global variable with this name already exists.",
-  "inform_valid_variable_duplicated" : "A local variable with this name already exists.",
-  "arrangement": "Arrangement",
-  "conversion": "Conversion",
-  "$sin": "sin",
-  "$cos": "cos",
-  "$tan": "tan",
-  "$sqrt": "sqrt",
-  "$pow": "pow",
-  "$log": "log",
-  "$abs": "abs",
-  "$negate": "negate",
-  "$invert": "invert",
-  "$max": "maximum",
-  "$min": "minimum",
-  "$substring": "substring",
-  "$length": "length",
-  "$uppercase": "uppercase",
-  "$lowercase": "lowercase",
-  "$charAt": "char_at",
-  "$numElements": "total_of_elements",
-  "$matrixLines": "total_of_lines",
-  "$matrixColumns": "total_of_columns",
-  "$isReal": "is_real",
-  "$isInt": "is_integer",
-  "$isBool": "is_logic",
-  "$castReal": "to_real",
-  "$castInt": "to_integer",
-  "$castBool": "to_logic",
-  "$castString": "to_string",
-  "text_ivprog_version":"Version"
-}

+ 0 - 86
ivprog_contexto/i18n/es/error.json

@@ -1,86 +0,0 @@
-{
-  "token_missing_one": "Erro de sintaxe: Espera-se $0, mas encontrou-se $1 na linha:$2, coluna:$3",
-  "token_missing_two": "Erro de sintaxe: Esperava-se $0 ou $1 mas encontrou-se $2 na liha:$3, coluna: $4",
-  "eos_missing": "Falta uma nova linha ou ; na linha: $0, coluna: $1",
-  "invalid_type": "$0 na linha: $1, coluna: $2 é um tipo inválido. Os tipos válidos são: $3",
-  "invalid_array_dimension": "A dimensão inválida na linha: $0, coluna: $1. Insira um $2 ou identificador válido do mesmo tipo.",
-  "invalid_array_size": "O tamnho do vetor/matriz excede o máximo de 2 na linha $0",
-  "extra_lines": "Nenhum texto é permitido após '}' em 'programa {...}'",
-  "invalid_main_return": "A função $0 deve retornar $1 na linha $2",
-  "invalid_var_declaration": "Erro na linha $0. Variáveis só podem ser declarados no corpo principal da função e de preferência nas primeiras linhas.",
-  "invalid_break_command": "Erro na linha $0. O comando $1 não pode ser usado fora de uma estrutura de repetição ou 'escolha...caso'",
-  "invalid_terminal": "Não é possível utilizar $0 na expressão da linha: $1, coluna: $2. Tente um valor númerico, variável ou chamada de função.",
-  "const_not_init": "Erro na linha: $0, coluna: $1. Uma variável declarada como const deve ser inicializada",
-  "id_missing": "Esperava-se um identificador, mas encontrou-se $0 na linha: $1, coluna: $2",
-  "invalid_id_format": "$0 na linha: $1, coluna: $2 não é um identificador válido. O símbolo '.' não é permitido neste contexto.",
-  "main_missing": "A função principal não foi encontrada",
-  "invalid_global_var": "Erro crítico: Chamada inválida da função initGlobal fora do contexto BASE",
-  "not_implemented": "Erro interno crítico: A função definida pelo sistema $0 não foi implementada.",
-  "function_missing": "A função $0 não foi encontrada",
-  "function_missing_full": "A função $0 na linha: $1, coluna: $2 não foi encontrada",
-  "invalid_parameters_size_full": "Erro na linha $0: a quantidade de parâmetros fornecidos à função $1 está incorreta. Esperava-se $2, encontrou-se $3.",
-  "invalid_parameters_size": "A quantidade de parâmetros fornecidos à função $0 está incorreta. Esperava-se $1, encontrou-se $2",
-  "invalid_ref_full": "A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é válida para esta função. Use uma variável ou posição de vetor.",
-  "invalid_ref": "A expressão $0 fornecida como parâmetro para a função $1 não é válida para esta função. Use uma variável ou posição de vetor.",
-  "invalid_parameter_type_full": "A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é compatível com o tipo esperado.",
-  "invalid_parameter_type": "A expressão $0 fornecida como parâmetro para a função $1 não é compatível com o tipo esperado.",
-  "unknown_command_full": "Erro interno crítico: comando desconhecido encontrado na linha $0",
-  "unknown_command": "Erro interno crítico: comando desconhecido encontrado!",
-  "loop_condition_type_full": "Erro na linha: $0, coluna $1: a condição dos laços de repetição deve ser do tipo lógico",
-  "loop_condition_type": "A condição dos laços de repetição deve ser do tipo lógico",
-  "endless_loop_full": "Possível laço infinito detectado no seu código. Verifique a linha $0",
-  "endless_loop": "Possível laço infinito detectado no seu código.",
-  "for_condition_type_full": "Erro na linha: $0, coluna $1: a condição de parada do comando para(...) deve ser do tipo lógico",
-  "for_condition_type": "A condição de parada do comando para(...) deve ser do tipo lógico",
-  "if_condition_type_full": "Erro na linha: $0, coluna $1: a condição de um comando se...senao deve ser do tipo lógico",
-  "if_condition_type": "A condição de um comando se...senao deve ser do tipo lógico",
-  "invalid_return_type_full": "Erro na linha $0: a expressão não produz um tipo compatível com a função $1. Tipo esperado: $2.",
-  "invalid_return_type": "A expressão não produz um tipo compatível com a função $0. Tipo esperado: $1.",
-  "invalid_void_return_full": "Erro na linha $0: a função $1 não pode retornar uma expressão vazia, use uma espressão do tipo $2",
-  "invalid_void_return": "A função $0 não pode retornar uma expressão vazia, use uma espressão do tipo $1",
-  "unexpected_break_command_full": "Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso na linha $0",
-  "unexpected_break_command": "Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso",
-  "invalid_dimension": "As dimensões de um vetor/matriz devem ser do tipo inteiro",
-  "void_in_expression_full": "Erro na linha: $0, coluna: $1: a função $2 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio",
-  "void_in_expression": "A função $0 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio",
-  "invalid_array_access_full": "Identificador $0 na linha: $1, coluna: $2 não se refere a um vetor/matriz válido",
-  "invalid_array_access": "Identificador $0 não se refere a um vetor/matriz válido",
-  "invalid_matrix_access_full": "Identificador $0 na linha: $1, coluna: $2 não se refere a uma matriz válida",
-  "invalid_matrix_access": "Identificador $0 não se refere a uma matriz válida",
-  "matrix_column_outbounds_full": "Erro na linha $0: número de colunas $1 é inválido para a matriz $2 que possui $3 colunas",
-  "matrix_column_outbounds": "Número de colunas $0 é inválido para a matriz $1 que possui $2 colunas",
-  "matrix_line_outbounds_full": "Erro na linha $0: número de linhas $1 é inválido para a matriz $2 que possui $3 linhas",
-  "matrix_line_outbounds": "Número de linhas $0 é inválido para a matriz $1 que possui $2 linhas",
-  "vector_line_outbounds_full": "Erro na linha $0: número de linhas $1 é inválido para a matriz $2 que possui $3 linhas",
-  "vector_line_outbounds": "Número de linhas $0 é inválido para a matriz $1 que possui $2 linhas",
-  "vector_not_matrix_full": "Erro na linha $0: $1 não é uma matriz",
-  "vector_not_matrix": "$1 não é uma matriz",
-  "invalid_infix_op_full": "Erro na linha $0: não é possível aplicar a operação $1 entre os tipos $2 e $3",
-  "invalid_infix_op": "Não é possível aplicar a operação $0 entre os tipos $1 e $2",
-  "invalid_unary_op_full": "Erro na linha $0: não é possível aplicar a operação $1 ao tipo $2",
-  "invalid_unary_op": "Não é possível aplicar a operação $0 ao tipo $1",
-  "unknown_op": "Erro interno crítico: Operação $0 desconhecida",
-  "duplicate_function": "A função $0 na linha: $1, coluna: $2 já foi definida anteriormente.",
-  "duplicate_variable": "A variável $0 na linha: $1, coluna: $2 já foi declarada anteriormente.",
-  "main_parameters": "A função inicio não pode ter parâmetros.",
-  "symbol_not_found_full": "A variável $0 na linha: $1, coluna: $2 não foi declarada",
-  "symbol_not_found": "A variável $0 não foi declarada",
-  "array_dimension_not_int_full": "As dimensões de um vetor/matriz na linha: $0 devem ser do tipo inteiro.",
-  "array_dimension_not_int": "As dimensões de um vetor/matriz devem ser do tipo inteiro.",
-  "array_dimension_not_positive_full": "As dimensões de um vetor/matriz na linha: $0 devem ser valores positivos.",
-  "array_dimension_not_positive": "As dimensões de um vetor/matriz devem ser valores positivos.",
-  "incompatible_types_full": "O tipo $0 não é compatível com o tipo resultante da expressão na linha $1",
-  "incompatible_types": "O tipo $0 não é compatível com o tipo resultante da expressão fornecida.",
-  "incompatible_types_array_full": "A expressão $0 é incompatível com o tipo $1 na linha: $2, coluna: $3.",
-  "incompatible_types_array": "A expressão $0 é incompatível com o tipo $1.",
-  "invalid_case_type_full": "O caso $0 na linha $1 é incompatível com o tipo $2.",
-  "invalid_case_type": "O caso $0 é incompatível com o tipo $1.",
-  "function_no_return": "A função $0 não possui um retorno acessível. Toda função deve ter ao menos um retorno no seu corpo principal.",
-  "invalid_array_literal_type_full": "Erro na linha $0: a expressão $1 não resulta em um tipo compatível.",
-  "invalid_array_literal_type": "A expressão $0 não resulta em um tipo compatível.",
-  "invalid_array_literal_line_full": "Erro na linha $0: esperava-se $1 linhas mas encontrou $2.",
-  "invalid_array_literal_line": "Esperava-se $0 linhas mas encontrou $1.",
-  "invalid_array_literal_column_full": "Erro na linha $0: esperava-se $1 colunas mas encontrou $2.",
-  "invalid_array_literal_column": "Esperava-se $0 colunas mas encontrou $1.",
-  "exceeded_input_request": "The amount of requests exceeded the amount of available inputs"
-}

+ 0 - 9
ivprog_contexto/i18n/es/index.js

@@ -1,9 +0,0 @@
-import errors from './error.json';
-import messages from './message.json'
-import ui from './ui.json';
-
-export default {
- 'message' : messages,
- 'error': errors,
- 'ui': ui
-}

+ 0 - 3
ivprog_contexto/i18n/es/message.json

@@ -1,3 +0,0 @@
-{
-  
-}

+ 0 - 140
ivprog_contexto/i18n/es/ui.json

@@ -1,140 +0,0 @@
-{
-  "function": "function",
-  "btn_clear": "Clear",
-  "btn_function": "Function",
-  "btn_arithmetic_plus": "Sum",
-  "btn_arithmetic_minus": "Minus",
-  "btn_arithmetic_multiplication": "Multiplication",
-  "btn_arithmetic_division": "Division",
-  "btn_arithmetic_module": "Module",
-  "btn_break":"Break",
-  "btn_case":"Case",
-  "start": "start",
-  "void": "void",
-  "integer": "integer",
-  "real": "real",
-  "program": "program",
-  "text": "string",
-  "text_start": "text",
-  "boolean": "boolean",
-  "true": "true",
-  "false": "false",
-  "variable": "Variable",
-  "command": "Command",
-  "new_parameter": "new_parameter",
-  "new_variable": "new_variable",
-  "new_global": "new_global",
-  "new_function": "new_function",
-  "vector": "vector",
-  "text_comment_start": "Initial comment of function...",
-  "text_comment_main": "This is the main function...",
-  "text_read_var": "Reading data",
-  "text_write_var": "Writing data",
-  "text_command_read":"read",
-  "text_command_write":"write",
-  "text_comment": "Comment",
-  "text_attribution": "Attribution",
-  "text_if":"if",
-  "text_break":"break",
-  "text_else":"else",
-  "text_return":"return",
-  "text_btn_return":"Return",
-  "text_for":"for",
-  "text_code_while":"while",
-  "text_code_do":"do",
-  "text_command_do":"do",
-  "text_code_switch": "switch",
-  "text_code_case": "case",
-  "text_logic_expression": "Logic Expression",
-  "text_arithmetic_expression": "Relational Expression",
-  "text_iftrue": "If true then",
-  "text_repeatNtimes": "Repeat N times",
-  "text_receives": "receives",
-  "text_whiletrue": "While true",
-  "text_dowhiletrue": "Do while true",
-  "text_switch": "Switch",
-  "text_functioncall": "Function call",
-  "text_value": "Value",
-  "text_operator": "Operator",
-  "text_parentheses": "Parentheses",
-  "text_change": "Change",
-  "text_teacher_algorithm": "Algorithm",
-  "text_teacher_algorithm_include": "Include the following algorithm in exercise",
-  "text_teacher_test_case": "Test cases",
-  "text_teacher_config": "Settings",
-  "text_teacher_data_types": "Data types",
-  "text_teacher_commands": "Commands",
-  "text_teacher_functions": "Functions",
-  "text_teacher_create_functions": "Create new functions",
-  "text_teacher_create_movement_functions": "Move functions",
-  "text_teacher_test_case_input": "Input",
-  "text_teacher_test_case_output": "Output",
-  "text_teacher_test_case_actions": "Actions",
-  "text_teacher_test_case_add": "Add test cases",
-  "text_header_ivprog_functions": "iVProg Functions",
-  "text_menu_functions_math":"Mathematics",
-  "text_menu_functions_text":"Text",
-  "text_menu_functions_arrangement":"Arrangement",
-  "text_menu_functions_conversion":"Conversion",
-  "text_none_variable":"There is no declared variable",
-  "text_none_variable_instruction":"Create a new variable to use it",
-  "text_ivprog_description":"Interactive Visual Programming on the Internet",
-  "tooltip_visual": "Visual programming",
-  "tooltip_textual": "Textual programming",
-  "tooltip_upload": "Upload code file",
-  "tooltip_download": "Download code file",
-  "tooltip_undo": "Undo",
-  "tooltip_redo": "Redo",
-  "tooltip_run": "Run program",
-  "tooltip_evaluate": "Evaluate program",
-  "tooltip_help": "Help",
-  "tooltip_add_global": "Add global variable",
-  "tooltip_minimize": "Hidde function elements",
-  "tooltip_console": "Open/Close console",
-  "var_menu_select_var": "Select a var",
-  "var_menu_select_all": "Select",
-  "var_menu_select_function": "Select a function",
-  "expression_menu_select": "Construct any logical condition",
-  "$sin": "sen",
-  "math": "Mathematic",
-  "text": "Text",
-  "arrangement": "Arrangement",
-  "conversion": "Conversion",
-  "math": "Mathematic",
-  "inform_valid_name": "Inform a valid name!",
-  "inform_valid_content": "Enter some content!",
-  "inform_valid_expression": "Construct the logical condition!",
-  "inform_valid_name_duplicated": "This name is already in use by other function.",
-  "inform_valid_global_duplicated": "A global variable with this name already exists.",
-  "inform_valid_variable_duplicated" : "A local variable with this name already exists.",
-  "text_t": "Text",
-  "arrangement": "Arrangement",
-  "conversion": "Conversion",
-  "$sin": "sin",
-  "$cos": "cos",
-  "$tan": "tan",
-  "$sqrt": "sqrt",
-  "$pow": "pow",
-  "$log": "log",
-  "$abs": "abs",
-  "$negate": "negate",
-  "$invert": "invert",
-  "$max": "maximum",
-  "$min": "minimum",
-  "$substring": "substring",
-  "$length": "length",
-  "$uppercase": "uppercase",
-  "$lowercase": "lowercase",
-  "$charAt": "char_at",
-  "$numElements": "total_of_elements",
-  "$matrixLines": "total_of_lines",
-  "$matrixColumns": "total_of_columns",
-  "$isReal": "is_real",
-  "$isInt": "is_integer",
-  "$isBool": "is_logic",
-  "$castReal": "to_real",
-  "$castInt": "to_integer",
-  "$castBool": "to_logic",
-  "$castString": "to_string",
-  "text_ivprog_version":"Version"
-}

+ 0 - 117
ivprog_contexto/i18n/i18n-database.json

@@ -1,117 +0,0 @@
-{
-	"function": {
-		"en": "function",
-		"es": "función",
-		"pt": "função"
-	},
-	"Function": {
-		"en": "Function",
-		"es": "Función",
-		"pt": "Função"
-	},
-	"start": {
-		"en": "start",
-		"es": "comienzo",
-		"pt": "inicio"
-	},
-	"void": {
-		"en": "void",
-		"es": "vacío",
-		"pt": "vazio"
-	},
-	"integer": {
-		"en": "integer",
-		"es": "entero",
-		"pt": "inteiro"
-	},
-	"real": {
-		"en": "real",
-		"es": "real",
-		"pt": "real"
-	},
-	"program": {
-		"en": "program",
-		"es": "programa",
-		"pt": "programa"
-	},
-	"text": {
-		"en": "text",
-		"es": "texto",
-		"pt": "texto"
-	},
-	"boolean": {
-		"en": "boolean",
-		"es": "booleano",
-		"pt": "booleano"
-	},
-	"true": {
-		"en": "true",
-		"es": "verdadero",
-		"pt": "verdadeiro"
-	},
-	"false": {
-		"en": "false",
-		"es": "falso",
-		"pt": "falso"
-	},
-	"Variable": {
-		"en": "Variable",
-		"es": "Variable",
-		"pt": "Variável"
-	},
-	"Command": {
-		"en": "Command",
-		"es": "Mando",
-		"pt": "Comando"
-	},
-	"new_parameter": {
-		"en": "new_parameter",
-		"es": "nuevo_parámetro",
-		"pt": "novo_parâmetro"
-	},
-	"new_variable": {
-		"en": "new_variable",
-		"es": "nuevo_variable",
-		"pt": "nova_variável"
-	},
-	"new_global": {
-		"en": "new_global",
-		"es": "nuevo_global",
-		"pt": "nova_global"
-	},
-	"new_function": {
-		"en": "new_function",
-		"es": "nueva_función",
-		"pt": "nova_função"
-	},
-	"vector": {
-		"en": "vector",
-		"es": "vector",
-		"pt": "vetor"
-	},
-	"text_comment_start": {
-		"en": "Initial comment of function...",
-		"es": "Comentario inicial de la función...",
-		"pt": "Comentário inicial da função..."
-	},
-	"text_comment_main": {
-		"en": "This is the main function...",
-		"es": "Esta es la función principal...",
-		"pt": "Esta é a função principal..."
-	},
-	"text_read_var": {
-		"en": "Reading data",
-		"es": "Leyendo datos",
-		"pt": "Leitura de dados"
-	},
-	"text_write_var": {
-		"en": "Writing data",
-		"es": "Escribir datos",
-		"pt": "Escrita de dados"
-	},
-	"text_comment": {
-		"en": "Comment",
-		"es": "Comentario",
-		"pt": "Comentário"
-	}
-}

+ 0 - 9
ivprog_contexto/i18n/index.js

@@ -1,9 +0,0 @@
-import EN from './en';
-import PT from './pt';
-import ES from './es';
-
-export default {
-  'en': EN,
-  'pt': PT,
-  'es': ES
-}

+ 0 - 86
ivprog_contexto/i18n/pt/error.json

@@ -1,86 +0,0 @@
-{
-  "token_missing_one": "Erro de sintaxe: Espera-se $0, mas encontrou-se $1 na linha:$2, coluna:$3",
-  "token_missing_two": "Erro de sintaxe: Esperava-se $0 ou $1 mas encontrou-se $2 na liha:$3, coluna: $4",
-  "eos_missing": "Falta uma nova linha ou ; na linha: $0, coluna: $1",
-  "invalid_type": "$0 na linha: $1, coluna: $2 é um tipo inválido. Os tipos válidos são: $3",
-  "invalid_array_dimension": "A dimensão inválida na linha: $0, coluna: $1. Insira um $2 ou identificador válido do mesmo tipo.",
-  "invalid_array_size": "O tamnho do vetor/matriz excede o máximo de 2 na linha $0",
-  "extra_lines": "Nenhum texto é permitido após '}' em 'programa {...}'",
-  "invalid_main_return": "A função $0 deve retornar $1 na linha $2",
-  "invalid_var_declaration": "Erro na linha $0. Variáveis só podem ser declarados no corpo principal da função e de preferência nas primeiras linhas.",
-  "invalid_break_command": "Erro na linha $0. O comando $1 não pode ser usado fora de uma estrutura de repetição ou 'escolha...caso'",
-  "invalid_terminal": "Não é possível utilizar $0 na expressão da linha: $1, coluna: $2. Tente um valor númerico, variável ou chamada de função.",
-  "const_not_init": "Erro na linha: $0, coluna: $1. Uma variável declarada como const deve ser inicializada",
-  "id_missing": "Esperava-se um identificador, mas encontrou-se $0 na linha: $1, coluna: $2",
-  "invalid_id_format": "$0 na linha: $1, coluna: $2 não é um identificador válido. O símbolo '.' não é permitido neste contexto.",
-  "main_missing": "A função principal não foi encontrada",
-  "invalid_global_var": "Erro crítico: Chamada inválida da função initGlobal fora do contexto BASE",
-  "not_implemented": "Erro interno crítico: A função definida pelo sistema $0 não foi implementada.",
-  "function_missing": "A função $0 não foi encontrada",
-  "function_missing_full": "A função $0 na linha: $1, coluna: $2 não foi encontrada",
-  "invalid_parameters_size_full": "Erro na linha $0: a quantidade de parâmetros fornecidos à função $1 está incorreta. Esperava-se $2, encontrou-se $3.",
-  "invalid_parameters_size": "A quantidade de parâmetros fornecidos à função $0 está incorreta. Esperava-se $1, encontrou-se $2",
-  "invalid_ref_full": "A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é válida para esta função. Use uma variável ou posição de vetor.",
-  "invalid_ref": "A expressão $0 fornecida como parâmetro para a função $1 não é válida para esta função. Use uma variável ou posição de vetor.",
-  "invalid_parameter_type_full": "A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é compatível com o tipo esperado.",
-  "invalid_parameter_type": "A expressão $0 fornecida como parâmetro para a função $1 não é compatível com o tipo esperado.",
-  "unknown_command_full": "Erro interno crítico: comando desconhecido encontrado na linha $0",
-  "unknown_command": "Erro interno crítico: comando desconhecido encontrado!",
-  "loop_condition_type_full": "Erro na linha: $0, coluna $1: a condição dos laços de repetição deve ser do tipo lógico",
-  "loop_condition_type": "A condição dos laços de repetição deve ser do tipo lógico",
-  "endless_loop_full": "Possível laço infinito detectado no seu código. Verifique a linha $0",
-  "endless_loop": "Possível laço infinito detectado no seu código.",
-  "for_condition_type_full": "Erro na linha: $0, coluna $1: a condição de parada do comando para(...) deve ser do tipo lógico",
-  "for_condition_type": "A condição de parada do comando para(...) deve ser do tipo lógico",
-  "if_condition_type_full": "Erro na linha: $0, coluna $1: a condição de um comando se...senao deve ser do tipo lógico",
-  "if_condition_type": "A condição de um comando se...senao deve ser do tipo lógico",
-  "invalid_return_type_full": "Erro na linha $0: a expressão não produz um tipo compatível com a função $1. Tipo esperado: $2.",
-  "invalid_return_type": "A expressão não produz um tipo compatível com a função $0. Tipo esperado: $1.",
-  "invalid_void_return_full": "Erro na linha $0: a função $1 não pode retornar uma expressão vazia, use uma espressão do tipo $2",
-  "invalid_void_return": "A função $0 não pode retornar uma expressão vazia, use uma espressão do tipo $1",
-  "unexpected_break_command_full": "Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso na linha $0",
-  "unexpected_break_command": "Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso",
-  "invalid_dimension": "As dimensões de um vetor/matriz devem ser do tipo inteiro",
-  "void_in_expression_full": "Erro na linha: $0, coluna: $1: a função $2 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio",
-  "void_in_expression": "A função $0 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio",
-  "invalid_array_access_full": "Identificador $0 na linha: $1, coluna: $2 não se refere a um vetor/matriz válido",
-  "invalid_array_access": "Identificador $0 não se refere a um vetor/matriz válido",
-  "invalid_matrix_access_full": "Identificador $0 na linha: $1, coluna: $2 não se refere a uma matriz válida",
-  "invalid_matrix_access": "Identificador $0 não se refere a uma matriz válida",
-  "matrix_column_outbounds_full": "Erro na linha $0: número de colunas $1 é inválido para a matriz $2 que possui $3 colunas",
-  "matrix_column_outbounds": "Número de colunas $0 é inválido para a matriz $1 que possui $2 colunas",
-  "matrix_line_outbounds_full": "Erro na linha $0: número de linhas $1 é inválido para a matriz $2 que possui $3 linhas",
-  "matrix_line_outbounds": "Número de linhas $0 é inválido para a matriz $1 que possui $2 linhas",
-  "vector_line_outbounds_full": "Erro na linha $0: número de linhas $1 é inválido para a matriz $2 que possui $3 linhas",
-  "vector_line_outbounds": "Número de linhas $0 é inválido para a matriz $1 que possui $2 linhas",
-  "vector_not_matrix_full": "Erro na linha $0: $1 não é uma matriz",
-  "vector_not_matrix": "$1 não é uma matriz",
-  "invalid_infix_op_full": "Erro na linha $0: não é possível aplicar a operação $1 entre os tipos $2 e $3",
-  "invalid_infix_op": "Não é possível aplicar a operação $0 entre os tipos $1 e $2",
-  "invalid_unary_op_full": "Erro na linha $0: não é possível aplicar a operação $1 ao tipo $2",
-  "invalid_unary_op": "Não é possível aplicar a operação $0 ao tipo $1",
-  "unknown_op": "Erro interno crítico: Operação $0 desconhecida",
-  "duplicate_function": "A função $0 na linha: $1, coluna: $2 já foi definida anteriormente.",
-  "duplicate_variable": "A variável $0 na linha: $1, coluna: $2 já foi declarada anteriormente.",
-  "main_parameters": "A função inicio não pode ter parâmetros.",
-  "symbol_not_found_full": "A variável $0 na linha: $1, coluna: $2 não foi declarada",
-  "symbol_not_found": "A variável $0 não foi declarada",
-  "array_dimension_not_int_full": "As dimensões de um vetor/matriz na linha: $0 devem ser do tipo inteiro.",
-  "array_dimension_not_int": "As dimensões de um vetor/matriz devem ser do tipo inteiro.",
-  "array_dimension_not_positive_full": "As dimensões de um vetor/matriz na linha: $0 devem ser valores positivos.",
-  "array_dimension_not_positive": "As dimensões de um vetor/matriz devem ser valores positivos.",
-  "incompatible_types_full": "O tipo $0 não é compatível com o tipo resultante da expressão na linha $1",
-  "incompatible_types": "O tipo $0 não é compatível com o tipo resultante da expressão fornecida.",
-  "incompatible_types_array_full": "A expressão $0 é incompatível com o tipo $1 na linha: $2, coluna: $3.",
-  "incompatible_types_array": "A expressão $0 é incompatível com o tipo $1.",
-  "invalid_case_type_full": "O caso $0 na linha $1 é incompatível com o tipo $2.",
-  "invalid_case_type": "O caso $0 é incompatível com o tipo $1.",
-  "function_no_return": "A função $0 não possui um retorno acessível. Toda função deve ter ao menos um retorno no seu corpo principal.",
-  "invalid_array_literal_type_full": "Erro na linha $0: a expressão $1 não resulta em um tipo compatível.",
-  "invalid_array_literal_type": "A expressão $0 não resulta em um tipo compatível.",
-  "invalid_array_literal_line_full": "Erro na linha $0: esperava-se $1 linhas mas encontrou $2.",
-  "invalid_array_literal_line": "Esperava-se $0 linhas mas encontrou $1.",
-  "invalid_array_literal_column_full": "Erro na linha $0: esperava-se $1 colunas mas encontrou $2.",
-  "invalid_array_literal_column": "Esperava-se $0 colunas mas encontrou $1.",
-  "exceeded_input_request": "A quantidade de leituras requisitadas execedeu a quantidade de entradas disponíveis."
-}

+ 0 - 9
ivprog_contexto/i18n/pt/index.js

@@ -1,9 +0,0 @@
-import errors from './error.json';
-import messages from './message.json'
-import ui from './ui.json';
-
-export default {
- 'message' : messages,
- 'error': errors,
- 'ui': ui
-}

+ 0 - 3
ivprog_contexto/i18n/pt/message.json

@@ -1,3 +0,0 @@
-{
-  
-}

+ 0 - 142
ivprog_contexto/i18n/pt/ui.json

@@ -1,142 +0,0 @@
-{
-  "function": "funcao",
-  "btn_clear": "Limpar",
-  "btn_function": "Função",
-  "btn_arithmetic_plus": "Adição",
-  "btn_arithmetic_minus": "Subtração",
-  "btn_arithmetic_multiplication": "Multiplicação",
-  "btn_arithmetic_division": "Divisão",
-  "btn_arithmetic_module": "Módulo",
-  "btn_break":"Pare",
-  "btn_case":"Caso",
-  "start": "inicio",
-  "void": "vazio",
-  "integer": "inteiro",
-  "and": "E",
-  "or": "OU",
-  "not": "nao",
-  "real": "real",
-  "program": "programa",
-  "text": "cadeia",
-  "text_start": "texto",
-  "boolean": "logico",
-  "true": "verdadeiro",
-  "false": "falso",
-  "variable": "Variável",
-  "command": "Comando",
-  "new_parameter": "novo_parametro",
-  "new_variable": "nova_variavel",
-  "new_global": "nova_global",
-  "new_function": "nova_funcao",
-  "vector": "vetor",
-  "text_comment_start": "Comentário inicial da função...",
-  "text_comment_main": "Esta é a função principal...",
-  "text_read_var": "Leitura de dados",
-  "text_write_var": "Escrita de dados",
-  "text_command_read":"leia",
-  "text_command_write":"escreva",
-  "text_return":"retorne",
-  "text_btn_return":"Retorno",
-  "text_comment": "Comentário",
-  "join_or": "ou",
-  "matrix_string": "matriz de $0",
-  "vector_string": "vetor de $0",
-  "text_attribution": "Atribuição",
-  "text_if":"se",
-  "text_break":"pare",
-  "text_else":"senao",
-  "text_for":"para",
-  "text_code_while":"enquanto",
-  "text_code_do":"faca",
-  "text_command_do":"faça",
-  "text_code_switch": "escolha",
-  "text_code_case": "caso",
-  "text_logic_expression": "Expressão Lógica",
-  "text_arithmetic_expression": "Expressão Relacional",
-  "text_iftrue": "Se verdadeiro então",
-  "text_repeatNtimes": "Repita N vezes",
-  "text_receives": "recebe",
-  "text_whiletrue": "Enquanto verdadeiro",
-  "text_dowhiletrue": "Faça enquanto verdadeiro",
-  "text_switch": "Escolha",
-  "text_functioncall": "Chamada de função",
-  "text_value": "Valor",
-  "text_operator": "Operador",
-  "text_parentheses": "Parênteses",
-  "text_change": "Alterar",
-  "text_teacher_algorithm": "Algoritmo",
-  "text_teacher_algorithm_include": "Incluir o algoritmo abaixo no exercício",
-  "text_teacher_test_case": "Casos de teste",
-  "text_teacher_config": "Configurações",
-  "text_teacher_data_types": "Tipos de dados",
-  "text_teacher_commands": "Comandos",
-  "text_teacher_functions": "Funções",
-  "text_teacher_create_functions": "Criar novas funções",
-  "text_teacher_create_movement_functions": "Movimentar funções",
-  "text_teacher_test_case_input": "Entrada",
-  "text_teacher_test_case_output": "Saída",
-  "text_teacher_test_case_actions": "Ações",
-  "text_teacher_test_case_add": "Adicionar caso de teste",
-  "text_header_ivprog_functions": "Funções do iVProg",
-  "text_menu_functions_math":"Matemática",
-  "text_menu_functions_text":"Texto",
-  "text_menu_functions_arrangement":"Arranjo",
-  "text_menu_functions_conversion":"Conversão",
-  "text_none_variable":"Nenhuma variável declarada",
-  "text_none_variable_instruction":"Antes de utilizar uma variável, é necessário criá-la",
-  "text_ivprog_description":"Programação Visual interativa na Internet",
-  "tooltip_visual": "Programação visual",
-  "tooltip_textual": "Programação textual",
-  "tooltip_upload": "Upload de código fonte",
-  "tooltip_download": "Download do código fonte",
-  "tooltip_undo": "Desfazer",
-  "tooltip_redo": "Refazer",
-  "tooltip_run": "Executar o programa",
-  "tooltip_evaluate": "Avaliar o programa",
-  "tooltip_help": "Ajuda",
-  "tooltip_add_global": "Adicionar variável global",
-  "tooltip_minimize": "Ocultar os elementos da função",
-  "tooltip_console": "Abrir/fechar o terminal",
-  "var_menu_select_var": "Selecione uma variável",
-  "var_menu_select_all": "Selecione",
-  "var_menu_select_function": "Selecione uma função",
-  "expression_menu_select": "Construir uma expressão lógica",
-  "$sin": "sen",
-  "math": "Matematica",
-  "text_t": "Texto",
-  "inform_valid_name": "Informe um nome válido!",
-  "inform_valid_content": "Informe o conteúdo!",
-  "inform_valid_expression": "Construa uma expressão lógica!",
-  "inform_valid_name_duplicated": "Este nome já está em uso por outra função!",
-  "inform_valid_global_duplicated": "Já existe uma variável global com o nome informado.",
-  "inform_valid_variable_duplicated" : "Já existe uma variável local com o nome informado.",
-  "arrangement": "Arranjo",
-  "conversion": "Conversao",
-  "$sin": "seno",
-  "$cos": "cosseno",
-  "$tan": "tangente",
-  "$sqrt": "raiz_quadrada",
-  "$pow": "potencia",
-  "$log": "logaritmo",
-  "$abs": "modulo",
-  "$negate": "trocar_sinal",
-  "$invert": "inverter_valor",
-  "$max": "maximo",
-  "$min": "minimo",
-  "$substring": "subcadeia",
-  "$length": "comprimento",
-  "$uppercase": "caixa_alta",
-  "$lowercase": "caixa_baixa",
-  "$charAt": "texto_na_posicao",
-  "$numElements": "total_de_elementos",
-  "$matrixLines": "total_de_linhas",
-  "$matrixColumns": "total_de_colunas",
-  "$isReal": "e_real",
-  "$isInt": "e_inteiro",
-  "$isBool": "e_logico",
-  "$castReal": "como_real",
-  "$castInt": "como_inteiro",
-  "$castBool": "como_logico",
-  "$castString": "como_cadeia",
-  "text_ivprog_version":"Versão"
-}

BIN
ivprog_contexto/img/background-panel.png


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
ivprog_contexto/img/empty.svg


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
ivprog_contexto/img/new_line.svg


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
ivprog_contexto/img/no_new_line.svg


BIN
ivprog_contexto/img/trash-icon.png


+ 74 - 35
ivprog_contexto/index.html

@@ -2,25 +2,20 @@
 <html>
   <head>
     <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-    <meta http-equiv="cache-control" content="no-cache">
-    <meta http-equiv="cache-control" content="no-store">
-    <meta http-equiv="cache-control" content="max-age=0">
-    <meta http-equiv="expires" content="-1">
-    <meta http-equiv="pragma" content="no-cache">
     <title></title>
-    <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
-    <link rel="stylesheet" type="text/css" href="js/semantic/semantic.min.css">
+    <link href="css/roboto.css" type="text/css" rel="stylesheet">
+    <link rel="stylesheet" href="css/semantic.min.css"/>
+    <link rel="stylesheet" type="text/css" href="css/codemirror.css">
+    <link rel="stylesheet" type="text/css" href="css/show-hint.css">
+    <link rel="stylesheet" type="text/css" href="css/ttcn.css">
     <link rel="stylesheet" type="text/css" href="css/ivprog-visual-1.0.css">
     <link rel="stylesheet" type="text/css" href="css/ivprog-term.css">
-    <script src="js/jquery-3.3.1.min.js"></script>
-    <script src="js/iassign-integration-functions.js"></script>
-    <script src="build/ivprog.bundle.js"></script>
-    <script src="js/semantic/semantic.min.js"></script>
-    <script src="js/semantic/semantic-buttons.js"></script>
-
-    <script src="js/jquery-ui.js"></script>
+    <link rel="stylesheet" type="text/css" href="css/ivprog-editor.css">
+    <script src="js/jquery.min.js"></script>
+    <script src="js/jquery-ui.min.js"></script>
+    <script src="js/semantic.min.js"></script>
     <script src="js/Sortable.js"></script>
-    
+    <script src="js/iassign-integration-functions.js"></script>
   </head>
   <body>
 
@@ -31,7 +26,7 @@
       </div>
 
     <div class="content height_100">
-   
+
       <div class="ui raised container segment div_to_body">
 
         <div class="ui container main_title only_in_frame">
@@ -57,9 +52,12 @@
           <a class="item redo_button disabled">
             <i class="redo icon"></i>
           </a>
-          <a class="item run_button">
+          <a id="run_button" class="item run_button">
             <i class="play icon"></i>
           </a>
+          <a id="stop_button" class="item stop_button" style="display: none">
+            <i class="stop icon"></i>
+          </a>
           <a class="item assessment assessment_button">
             <i class="check icon"></i>
           </a>
@@ -74,10 +72,16 @@
         <div class="ui one column container segment ivprog_visual_panel loading">
 
           <div class="global_var">
-            <i class="icon plus circle purple add_global_button"></i>
-            <i class="icon circle white back"></i>
 
-            <div class="ui icon button add-globalVar-button add_global_button purple"><i class="icon superscript"></i></div>
+
+            <div class="ui icon button add-globalVar-button add_global_button purple">
+
+              <i class="icons">
+                <i class="icon superscript" style="margin-top: -2px;margin-bottom: 2px;margin-left: 1px;margin-right: 1px; font-size: 18px;"></i>
+                <i class="corner add icon inverted" style="font-size: 10px;padding-top: 5px;padding-left: 7px;"></i>
+              </i>
+
+            </div>
 
             <div class="list_globals" id="listGlobalsHandle"></div>
 
@@ -98,25 +102,60 @@
 
 
         <div class="ui one column container segment ivprog_textual_panel loading" style="display: none;">
-          <textarea class="ivprog_textual_code" readonly></textarea>
+          <textarea id="ivprog-text-editor" class=".ivprog_textual_code"></textarea>
         </div>
+        <div id='ivprog-term-div' class="six column wide">
 
-        <div id='ivprog-term' class="six column wide">
-          <div class="div_toggle_console"><i class="inverted terminal icon green button_toggle_console"></i></div>
         </div>
       </div>
-
     </div>
-
+    <div class="dimmer_content_message">
+      <h3>Aconteceu um erro ao processar a atividade. <br> Recarregue a página para tentar novamente.</h3>
+      <button class="positive ui button" onclick="window.parent.location.reload()">Recarregar</button>
+    </div>
+    <script src="js/iassign-integration-functions.js"></script>
   </div>
-
-    <script>
-      $(document).ready(() => {
-        ivprogCore.LocalizedStrings.updateTagText();
-        ivprogCore.initVisualUI();
-        prepareEnvironment();
+  <script src="js/vendors~main.685d1cf2ece1ed4ebb99.js"></script><script src="js/main.7121176c0750a24caa1f.js"></script></body>
+  <script>
+    var mouseX;
+    var mouseY;
+    $(document).ready(() => {
+      var $buttons = $('.ivprog_format .button'),
+        handler = {
+          activate: function () {
+            $(this)
+              .addClass('active')
+              .siblings()
+              .removeClass('active');
+          }
+        };
+
+      $buttons.on('click', handler.activate);
+      $('.ivprog_format_info').popup(
+        {
+          popup: $('.custom.popup'),
+          on: 'click'
+        });
+
+      $(".data_types_dropdown").dropdown();
+
+      $('.ui.dropdown').dropdown();
+
+      $('.ivprog_visual_panel').removeClass("loading");
+
+      $(document).mousemove(function (e) {
+        var parentOffset = $('.ivprog_visual_panel').offset();;
+        mouseX = e.pageX - parentOffset.left + 300;
+        mouseY = e.pageY - parentOffset.top + 100;
+        /*$('.created_element').css('top', mouseY);
+        $('.created_element').css('left', mouseX);*/
       });
-    </script>
-
-  </body>
-</html>
+      ivprogCore.LocalizedStrings.updateTagText();
+      ivprogCore.CodeEditor.initTextEditor("ivprog-text-editor");
+      iassingIntegration();
+      if (iLMparameters.iLM_PARAM_TeacherAutoEval == null) {
+        ivprogCore.initVisualUI();
+      }
+    });
+  </script>
+</html>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 1491
ivprog_contexto/js/Sortable.js


+ 0 - 92
ivprog_contexto/js/assessment/ivprogAssessment.js

@@ -1,92 +0,0 @@
-import { IVProgParser } from "./../ast/ivprogParser";
-import { SemanticAnalyser } from "./../processor/semantic/semanticAnalyser";
-import { IVProgProcessor } from "./../processor/ivprogProcessor";
-import { InputTest } from "./../util/inputTest";
-import { OutputTest } from "./../util/outputTest";
-
-export class IVProgAssessment {
-
-  constructor (textCode, testCases, domConsole) {
-    this.textCode = textCode;
-    this.testCases = testCases;
-    this.domConsole = domConsole;
-  }
-
-  runTest () {
-    try {
-      // try and show error messages through domconsole
-      const parser = IVProgParser.createParser(this.textCode);
-      const semantic = new SemanticAnalyser(parser.parseTree());
-      const validTree = semantic.analyseTree();
-      // loop test cases and show messages through domconsole
-      const partialTests = this.testCases.map( (t, name) => {
-        return this.partialEvaluateTestCase(new IVProgProcessor(validTree), t.input, t.output, name);
-      });
-      const testResult = partialTests.reduce((acc, curr) => acc.then(curr), Promise.resolve(0));
-      return testResult.then(total => Promise.resolve(total / this.testCases.length))
-        .catch(err => {
-          this.domConsole.err("Erro durante a execução do programa");// try and show error messages through domconsole
-          this.domConsole.err(err.message);
-          return Promise.resolve(0);
-      });
-    } catch (error) {
-      this.domConsole.err("Erro durante a execução do programa");// try and show error messages through domconsole
-      this.domConsole.err(error.message);
-      return Promise.resolve(0);
-    }
-  }
-
-  evaluateTestCase (prog, inputList, outputList, name, accumulator) {
-    const outerThis = this;
-    const input = new InputTest(inputList);
-    const output = new OutputTest();
-    prog.registerInput(input);
-    prog.registerOutput(output);
-    const startTime = Date.now()
-    return prog.interpretAST().then( _ => {
-      const millis = Date.now() - startTime;
-      if (input.inputList.length !== input.index) {
-        outerThis.domConsole.err(`Caso de teste ${name + 1}: Falhou, ainda restam entradas!`);
-        outerThis.domConsole.info(`Levou ${millis}ms`);
-        return Promise.resolve(accumulator + 1 * (input.index/inputList.length));
-      } else if (output.list.length < outputList.length) {
-        outerThis.domConsole.err(`Caso de teste ${name + 1}: Falhou <${inputList.join(", ")};${outputList.join(", ")};${output.list.join(", ")}>`);
-        outerThis.domConsole.info(`Levou ${millis}ms`);
-        return Promise.resolve(accumulator + 1 * (output.list.length/outputList.length));
-      } else if (output.list.length > outputList.length) {
-        outerThis.domConsole.err(`Caso de teste ${name + 1}: Falhou <${inputList.join(", ")};${outputList.join(", ")};${output.list.join(", ")}>`);
-        outerThis.domConsole.info(`Levou ${millis}ms`);
-        return Promise.resolve(accumulator + 1 * (outputList.length/output.list.length));
-      } else {
-        const isOk = outerThis.checkOutput(output.list, outputList);
-        if(!isOk) {
-          outerThis.domConsole.err(`Caso de teste ${name + 1}: Falhou <${inputList.join(", ")};${outputList.join(", ")};${output.list.join(", ")}>`);
-          outerThis.domConsole.info(`Levou ${millis}ms`);
-          return Promise.resolve(accumulator);
-        } else {
-          outerThis.domConsole.info(`Caso de teste ${name + 1}: OK!`);
-          outerThis.domConsole.info(`Levou ${millis}ms`);
-          return Promise.resolve(accumulator + 1);
-        }
-      }
-    }).catch( error => {
-      this.domConsole.err(`Execução do caso de teste ${name + 1} falhou!`);// try and show error messages through domconsole
-      this.domConsole.err(error.message);
-      return Promise.resolve(accumulator);
-    });
-  }
-
-  partialEvaluateTestCase (prog, inputList, outputList, name) {
-    return this.evaluateTestCase.bind(this, prog, inputList, outputList, name);
-  }
-
-  checkOutput (aList, bList) {
-    for (let i = 0; i < aList.length; i++) {
-      const outValue = aList[i];
-      if(outValue != bList[i]) {
-        return false;
-      }
-    }
-    return true;
-  }
-}

+ 0 - 47
ivprog_contexto/js/ast/ASA.txt

@@ -1,47 +0,0 @@
-/*
-  Raiz(ASA)
-    |
-    |
-  DeclaraçõesGlobais + Funções
-
-  DeclaracaoGlobal
-    |
-    |
-  const? TIPO ID (= EAnd)?
-
-  Função
-    |
-    |
-  Declaracao => TIPO ID (= EAnd)?
-  Attribuição => ID = EAnd
-  IF, WHILE, SWITCH, FuncCall, RETURN
-
-  EAnd
-    |
-    |
-  EOR ( 'and' EAnd)?
-
-  EOR   => ENot ('or' EAnd)?
-
-  ENot  => 'not'? ER
-
-  ER    => E ((>=, <=, ==, >, <) E)?
-
-  E     => factor ((+, -) E)?
-
-  factor=> term ((*, /, %) factor)?
-
-  term  => literal || arrayAccess || FuncCall || ID || '('EAnd')'
-
-  arrayAccess
-    |
-    |
-  ID'['E']'('['E']')*
-
-  FuncCall
-    |
-    |
-  ID'('p.a')'
-
-  p.a => E (, p.a)?
-**/

+ 0 - 10
ivprog_contexto/js/ast/commands/arrayAssign.js

@@ -1,10 +0,0 @@
-import { Assign } from './assign';
-
-export class ArrayIndexAssign extends Assign {
-
-  constructor (id, lineExpression, columnExpression, expression) {
-    super(id, expression);
-    this.line = lineExpression;
-    this.column = columnExpression;
-  }
-}

+ 0 - 10
ivprog_contexto/js/ast/commands/arrayDeclaration.js

@@ -1,10 +0,0 @@
-import { Declaration } from './declaration';
-
-export class ArrayDeclaration extends Declaration {
-
-  constructor (id, type, lines, columns, initial, isConst)   {
-    super(id, type, initial, isConst);
-    this.lines = lines;
-    this.columns = columns;
-  }
-}

+ 0 - 10
ivprog_contexto/js/ast/commands/assign.js

@@ -1,10 +0,0 @@
-import { Command } from './command';
-
-export class Assign extends Command {
-  
-  constructor (id, expression) {
-    super();
-    this.id = id;
-    this.expression = expression;
-  }
-}

+ 0 - 8
ivprog_contexto/js/ast/commands/break.js

@@ -1,8 +0,0 @@
-import { Command } from './command';
-
-export class Break extends Command {
-
-  constructor () {
-    super();
-  }
-}

+ 0 - 18
ivprog_contexto/js/ast/commands/case.js

@@ -1,18 +0,0 @@
-import { Command } from './command';
-
-export class Case extends Command {
-
-  constructor (expression) {
-    super();
-    this.expression = expression;
-    this.commands = [];
-  }
-
-  setCommands (commands) {
-    this.commands = commands;
-  }
-
-  get isDefault () {
-    return this.expression === null;
-  }
-}

+ 0 - 14
ivprog_contexto/js/ast/commands/command.js

@@ -1,14 +0,0 @@
-export class Command {
-
-  constructor () {
-    this._sourceInfo = null;
-  }
-
-  set sourceInfo (sourceInfo) {
-    this._sourceInfo = sourceInfo;
-  }
-
-  get sourceInfo () {
-    return this._sourceInfo;
-  }
-}

+ 0 - 16
ivprog_contexto/js/ast/commands/commandBlock.js

@@ -1,16 +0,0 @@
-export class CommandBlock {
-	
-	constructor(variables, commands) {
-		this.variables = variables;
-		this.commands = commands;
-		this._sourceInfo = null;
-	}
-
-	set sourceInfo (sourceInfo) {
-		this._sourceInfo = sourceInfo;
-	}
-
-	get sourceInfo () {
-		return this._sourceInfo;
-	}
-}

+ 0 - 12
ivprog_contexto/js/ast/commands/declaration.js

@@ -1,12 +0,0 @@
-import { Command } from './command';
-
-export class Declaration extends Command {
-  
-  constructor (id, type, initial, isConst) {
-    super();
-    this.id = id;
-    this.type = type;
-    this.initial = initial;
-    this.isConst = isConst;
-  }
-}

+ 0 - 13
ivprog_contexto/js/ast/commands/doWhile.js

@@ -1,13 +0,0 @@
-import { While } from './while';
-
-export class DoWhile extends While {
-
-  constructor(condition, commandBlock) {
-    super(condition, commandBlock);
-  }
-
-  get testFirst () {
-    return false;
-  }
-  
-}

+ 0 - 16
ivprog_contexto/js/ast/commands/for.js

@@ -1,16 +0,0 @@
-import { Command } from './command';
-
-export class For extends Command {
-
-  constructor (assignment, condition, increment, commandBlock) {
-    super();
-    this.assignment = assignment;
-    this.condition = condition;
-    this.increment = increment;
-    this.commandBlock = commandBlock;
-  }
-
-  get commands () {
-    return this.commandBlock.commands;
-  }
-}

+ 0 - 17
ivprog_contexto/js/ast/commands/formalParameter.js

@@ -1,17 +0,0 @@
-export class FormalParameter {
-
-  constructor (type, id, byRef = false) {
-    this.type = type;
-    this.id = id;
-    this.byRef = byRef;
-    this._sourceInfo = null;
-  }
-
-  set sourceInfo (sourceInfo) {
-		this._sourceInfo = sourceInfo;
-	}
-
-	get sourceInfo () {
-		return this._sourceInfo;
-	}
-}

+ 0 - 32
ivprog_contexto/js/ast/commands/function.js

@@ -1,32 +0,0 @@
-import { Types } from './../../typeSystem/types';
-
-export class Function {
-
-  constructor(name, returnType, formalParameters, commandBlock) {
-    this.name = name;
-    this.returnType = returnType;
-    this.formalParameters = formalParameters;
-    this.commandBlock = commandBlock;
-    this._sourceInfo = null;
-  }
-
-  get isMain () {
-    return this.name === null && this.returnType.isCompatible(Types.VOID);
-  }
-
-  get commands () {
-    return this.commandBlock.commands;
-  }
-
-  get variablesDeclarations () {
-    return this.commandBlock.variables;
-  }
-
-  set sourceInfo (sourceInfo) {
-		this._sourceInfo = sourceInfo;
-	}
-
-	get sourceInfo () {
-		return this._sourceInfo;
-	}
-}

+ 0 - 11
ivprog_contexto/js/ast/commands/ifThenElse.js

@@ -1,11 +0,0 @@
-import { Command } from './command';
-
-export class IfThenElse extends Command {
-
-  constructor (condition, ifTrue, ifFalse) {
-    super();
-    this.condition = condition;
-    this.ifTrue = ifTrue;
-    this.ifFalse = ifFalse;
-  }
-}

+ 0 - 37
ivprog_contexto/js/ast/commands/index.js

@@ -1,37 +0,0 @@
-import { Break } from './break';
-import { Return } from './return';
-import { Assign } from './assign';
-import { ArrayIndexAssign } from './arrayAssign';
-import { Declaration } from './declaration';
-import { ArrayDeclaration } from './arrayDeclaration';
-import { While } from './while';
-import { For } from './for';
-import { Function } from './function';
-import { IfThenElse } from './ifThenElse';
-import { CommandBlock } from './commandBlock';
-import { DoWhile } from './doWhile';
-import { Switch } from './switch';
-import { Case } from './case';
-import { SysCall } from './sysCall';
-import { FormalParameter } from './formalParameter';
-import { FunctionCall } from './../expressions/functionCall'; //Proxy to expression since they do exatcly the same thing
-
-export {
-  Break,
-  Return,
-  Assign,
-  ArrayIndexAssign,
-  Declaration,
-  ArrayDeclaration,
-  While,
-  For,
-  Function,
-  IfThenElse,
-  CommandBlock,
-  DoWhile,
-  Switch,
-  Case,
-  SysCall,
-  FormalParameter,
-  FunctionCall
-};

+ 0 - 10
ivprog_contexto/js/ast/commands/return.js

@@ -1,10 +0,0 @@
-import { Command } from './command';
-
-export class Return extends Command {
-
-  constructor(expression) {
-    super();
-    this.expression = expression;
-  }
-  
-}

+ 0 - 10
ivprog_contexto/js/ast/commands/switch.js

@@ -1,10 +0,0 @@
-import { Command } from './command';
-
-export class Switch extends Command {
-  
-  constructor (expression, cases) {
-    super();
-    this.expression = expression;
-    this.cases = cases;
-  }
-}

+ 0 - 12
ivprog_contexto/js/ast/commands/sysCall.js

@@ -1,12 +0,0 @@
-/**
- * This class represents all the language defined functions.
- * The language processor uses the id provided here to properly execute the desired function.
- * The function is actually implemented inside the language processor.
- * All the functions can be found at: js/processor/definedFunctions.js
- */
-export class SysCall {
-
-  constructor (langFunc) {
-    this.langFunc = langFunc;
-  }
-}

+ 0 - 18
ivprog_contexto/js/ast/commands/while.js

@@ -1,18 +0,0 @@
-import { Command } from './command';
-
-export class While extends Command {
-
-  constructor (expression, commandBlock) {
-    super();
-    this.expression = expression;
-    this.commandBlock = commandBlock;
-  }
-
-  get commands () {
-    return this.commandBlock.commands;
-  }
-
-  get testFirst () {
-  	return true;
-  }
-}

+ 0 - 8
ivprog_contexto/js/ast/error/syntaxError.js

@@ -1,8 +0,0 @@
-export class SyntaxError extends Error {
-
-  constructor (...msg) {
-    super(...msg);
-    if(Error.captureStackTrace)
-      Error.captureStackTrace(this, SyntaxError);
-  }
-}

+ 0 - 70
ivprog_contexto/js/ast/error/syntaxErrorFactory.js

@@ -1,70 +0,0 @@
-import { LocalizedStrings } from './../../services/localizedStringsService';
-import { SyntaxError } from './syntaxError';
-
-export const SyntaxErrorFactory = Object.freeze({
-  extra_lines: () => new SyntaxError(LocalizedStrings.getError("extra_lines")),
-  token_missing_one: (expected, token) => {
-    const context = [expected, token.text, token.line, token.column];
-    return new SyntaxError(LocalizedStrings.getError("token_missing_one", context));
-  },
-  token_missing_list: (expectedList, token) => {
-    const line = expectedList.join(LocalizedStrings.getOR());
-    return SyntaxErrorFactory.token_missing_one(line, token);
-  },
-  id_missing: (token) => {
-    const context = [token.text, token.line, token.column];
-    return new SyntaxError(LocalizedStrings.getError("id_missing", context));
-  },
-  eos_missing: (token) => {
-    const context = [token.line, token.column];
-    return new SyntaxError(LocalizedStrings.getError("eos_missing", context));
-  },
-  invalid_array_dimension: (typeName, token) => {
-    const context = [token.line, token.column, typeName];
-    return new SyntaxError(LocalizedStrings.getError("invalid_array_dimension", context));
-  },
-  invalid_array_size: (token) => {
-    const context = [token.line];
-    return new SyntaxError(LocalizedStrings.getError("invalid_array_size", context));
-  },
-  invalid_main_return: (name, typeName, token) => {
-    const context = [name, typeName, token.line];
-    return new SyntaxError(LocalizedStrings.getError("invalid_main_return", context));
-  },
-  invalid_var_declaration: (token) => {
-    const context = [token.line];
-    return new SyntaxError(LocalizedStrings.getError("invalid_var_declaration", context));
-  },
-  invalid_break_command: (cmdName, token) => {
-    const context = [token.line, cmdName];
-    return new SyntaxError(LocalizedStrings.getError("invalid_break_command", context));
-  },
-  invalid_terminal: (token) => {
-    const context = [token.text, token.line, token.column];
-    return new SyntaxError(LocalizedStrings.getError('invalid_terminal', context));
-  },
-  invalid_type: (list, token) => {
-    const line = list.join(LocalizedStrings.getOR());
-    const context = [token.text, token.line, token.column, line]
-    return new SyntaxError(LocalizedStrings.getError("invalid_type", context));
-  },
-  const_not_init: (token) => {
-    const context = [token.line, token.column];
-    return new SyntaxError(LocalizedStrings.getError("const_not_init", context));
-  },
-  invalid_id_format: (token) => {
-    const context = [token.text, token.line, token.column];
-    return new SyntaxError(LocalizedStrings.getError("invalid_id_format", context));
-  },
-  duplicate_function: (token) => {
-    const context = [token.text, token.line, token.column];
-    return new SyntaxError(LocalizedStrings.getError("duplicate_function", context));
-  },
-  main_parameters: () => {
-    return new SyntaxError(LocalizedStrings.getError("main_parameters"));
-  },
-  duplicate_variable: (token) => {
-    const context = [token.text, token.line, token.column];
-    return new SyntaxError(LocalizedStrings.getError("duplicate_variable", context));
-  }
-});

+ 0 - 24
ivprog_contexto/js/ast/expressions/arrayAccess.js

@@ -1,24 +0,0 @@
-import { Expression } from './expression';
-
-export class ArrayAccess extends Expression {
-	
-	constructor (id, line, column) {
-		super();
-		this.id = id;
-		this.line = line;
-		this.column = column;
-	}
-
-	toString () {
-		const strLine = this.line.toString();
-		let strColumn = null;
-		if(this.column) {
-			strColumn = this.column.toString();
-		}
-		if(strColumn) {
-			return `${this.id}[${strLine}][${strColumn}]`;
-		} else {
-			return `${this.id}[${strLine}]`;
-		}
-	}
-}

+ 0 - 87
ivprog_contexto/js/ast/expressions/arrayLiteral.js

@@ -1,87 +0,0 @@
-import { Literal } from './literal';
-
-export class ArrayLiteral extends Literal {
-  
-  constructor(type, value) {
-    super(type);
-    this.value = value;
-  }
-
-  get subtype () {
-    let element = this.value[0];
-    if (element instanceof ArrayLiteral) {
-      return element.value[0].type;
-    } else {
-      return element.type;
-    }
-  }
-
-  get lines () {
-    return this.value.length;
-  }
-
-  get columns () {
-    let element = this.value[0];
-    if (!(element instanceof ArrayLiteral)){
-      return null;
-    } else {
-      return element.value[0].length;
-    }
-  }
-
-  get isVector () {
-    return this.columns === null;
-  }
-
-  get isValid () {
-    return true;//this.validateType() && this.validateSize();
-  }
-
-  validateType () {
-    // let valid = true;
-    // if(this.columns !== null) {
-    //   const len = this.columns;
-    //   const len2 = this.lines;
-    //   for (let i = len - 1; i >= 0; i--) {
-    //     for (let j = len2 - 1; j >= 0; j--) {
-    //       if(this.value[i].value[j].type !== this.subtype) {
-    //         valid = false;
-    //         break;
-    //       }
-    //     }
-    //   }
-    // } else {
-    //   const len = this.lines;
-    //   for (var i = len - 1; i >= 0; i--) {
-    //     if(this.value[i].type !== this.subtype) {
-    //       valid = false;
-    //       break;
-    //     }
-    //   }
-    // }
-    return true;//valid;
-  }
-
-  validateSize () {
-    let valid = true;
-    if(this.columns !== null) {
-      const equalityTest = data.value.map(v => v.length)
-      .reduce((old, next) => {
-        if (old === null) {
-          return next;
-        } else if (old === next) {
-          return old
-        } else {
-          return -1;
-        }
-      }, null);
-      valid = equalityTest !== -1;
-    }
-    return valid;
-  }
-
-  toString () {
-    const strList = this.value.map(arrayLiteral => arrayLiteral.toString());
-    return "{" + strList.join(',') + "}";
-  }
-}

+ 0 - 15
ivprog_contexto/js/ast/expressions/boolLiteral.js

@@ -1,15 +0,0 @@
-import { Literal } from './literal';
-import { Types } from './../../typeSystem/types';
-import { convertBoolToString } from "./../../typeSystem/parsers";
-
-export class BoolLiteral extends Literal {
-  
-  constructor(value) {
-    super(Types.BOOLEAN);
-    this.value = value;
-  }
-
-  toString () {
-    return convertBoolToString(this.value);
-  }
-}

+ 0 - 14
ivprog_contexto/js/ast/expressions/expression.js

@@ -1,14 +0,0 @@
-export class Expression {
-
-  constructor () {
-    this._sourceInfo = null;
-  }
-
-  set sourceInfo (sourceInfo) {
-		this._sourceInfo = sourceInfo;
-	}
-
-	get sourceInfo () {
-		return this._sourceInfo;
-	}
-}

+ 0 - 36
ivprog_contexto/js/ast/expressions/functionCall.js

@@ -1,36 +0,0 @@
-import { Expression } from './expression';
-import { LanguageDefinedFunction } from '../../processor/definedFunctions';
-
-export class FunctionCall extends Expression {
-
-	constructor (id, actualParameters) {
-		super();
-		this.id = id;
-		this.actualParameters = actualParameters;
-	}
-
-	get isMainCall () {
-		return this.id === null;
-	}
-
-	get parametersSize () {
-		return this.actualParameters.length;
-	}
-
-	toString () {
-		let name = null;
-		if(this.isMainCall) {
-			name = LanguageDefinedFunction.getMainFunctionName();
-		} else {
-			name = LanguageDefinedFunction.getLocalName(this.id);
-		}
-		let params = null;
-		if(this.actualParameters.length == 0) {
-			params = "()";
-		} else {
-			const strParams = this.actualParameters.map(v => v.toString());
-			params = "(" + strParams.join(",") + ")";
-		}
-		return name + params;
-	}
-}

+ 0 - 23
ivprog_contexto/js/ast/expressions/index.js

@@ -1,23 +0,0 @@
-import { ArrayAccess } from './arrayAccess';
-import { FunctionCall } from './functionCall';
-import { IntLiteral } from './intLiteral';
-import { RealLiteral } from './realLiteral';
-import { BoolLiteral } from './boolLiteral';
-import { StringLiteral } from './stringLiteral';
-import { ArrayLiteral } from './arrayLiteral';
-import { VariableLiteral } from './variableLiteral';
-import { InfixApp } from './infixApp';
-import { UnaryApp } from './unaryApp';
-
-export {
-	ArrayAccess,
-	FunctionCall,
-  IntLiteral,
-  RealLiteral,
-  BoolLiteral,
-  StringLiteral,
-  ArrayLiteral,
-  VariableLiteral,
-  InfixApp,
-  UnaryApp
-};

+ 0 - 18
ivprog_contexto/js/ast/expressions/infixApp.js

@@ -1,18 +0,0 @@
-import { Expression } from './expression';
-
-export class InfixApp extends Expression {
-
-  constructor(op, left, right) {
-    super();
-    this.op = op;
-    this.left = left;
-    this.right = right;
-  }
-
-  toString () {
-    const l = this.left.toString();
-    const op = this.op.value;
-    const r = this.right.toString();
-    return l + op + r;
-  }
-}

+ 0 - 15
ivprog_contexto/js/ast/expressions/intLiteral.js

@@ -1,15 +0,0 @@
-import { Literal } from './literal';
-import { Types } from './../../typeSystem/types';
-import { convertToString } from './../../typeSystem/parsers';
-
-export class IntLiteral extends Literal {
-  
-  constructor(value) {
-    super(Types.INTEGER);
-    this.value = value;
-  }
-
-  toString() {
-    return convertToString(this.value, this.type);
-  }
-}

+ 0 - 9
ivprog_contexto/js/ast/expressions/literal.js

@@ -1,9 +0,0 @@
-import { Expression } from './expression';
-
-export class Literal extends Expression {
-  
-  constructor (type) {
-    super();
-    this.type = type;
-  }
-}

+ 0 - 15
ivprog_contexto/js/ast/expressions/realLiteral.js

@@ -1,15 +0,0 @@
-import { Literal } from './literal';
-import { Types } from './../../typeSystem/types';
-import { convertToString } from './../../typeSystem/parsers';
-
-export class RealLiteral extends Literal {
-  
-  constructor(value) {
-    super(Types.REAL);
-    this.value = value;
-  }
-
-  toString() {
-    return convertToString(this.value, this.type);
-  }
-}

+ 0 - 14
ivprog_contexto/js/ast/expressions/stringLiteral.js

@@ -1,14 +0,0 @@
-import { Literal } from './literal';
-import { Types } from './../../typeSystem/types';
-
-export class StringLiteral extends Literal {
-  
-  constructor(value) {
-    super(Types.STRING);
-    this.value = value;
-  }
-
-  toString() {
-    return this.value;
-  }
-}

+ 0 - 14
ivprog_contexto/js/ast/expressions/unaryApp.js

@@ -1,14 +0,0 @@
-import {InfixApp} from './infixApp';
-
-export class UnaryApp extends InfixApp {
-  
-  constructor (op, left) {
-    super(op, left, null);
-  }
-
-  toString () {
-    const l = this.left.toString();
-    const op = this.op.value;
-    return op + l;
-  }
-}

+ 0 - 14
ivprog_contexto/js/ast/expressions/variableLiteral.js

@@ -1,14 +0,0 @@
-import { Literal } from './literal';
-import { Types } from './../../typeSystem/types';
-
-export class VariableLiteral extends Literal {
-  
-  constructor(id) {
-    super(Types.UNDEFINED);
-    this.id = id;
-  }
-
-  toString () {
-    return this.id;
-  }
-}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 1182
ivprog_contexto/js/ast/ivprogParser.js


+ 0 - 35
ivprog_contexto/js/ast/operators.js

@@ -1,35 +0,0 @@
-export const Operators = Object.freeze({
-  ADD: {ord: 0, value: "+"},
-  SUB: {ord: 1, value: "-"},
-  MULT: {ord: 2, value: '*'},
-  DIV: {ord: 3, value: '/'},
-  MOD: {ord: 4, value: '%'},
-  GT: {ord: 5, value: '>'},
-  GE: {ord: 6, value: '>='},
-  LT: {ord: 7, value: '<'},
-  LE: {ord: 8, value: '<='},
-  EQ: {ord: 9, value: '=='},
-  NEQ: {ord: 10, value: '!='},
-  AND: {ord: 11, value: 'and'},
-  OR: {ord: 12, value: 'or'},
-  NOT: {ord: 13, value: 'not'}
-});
-
-export function convertFromString (op) {
-  switch (op) {
-    case '+' : return Operators.ADD;
-    case '-' : return Operators.SUB;
-    case '*' : return Operators.MULT;
-    case '/' : return Operators.DIV;
-    case '%' : return Operators.MOD;
-    case '>' : return Operators.GT;
-    case '>=' : return Operators.GE;
-    case '<' : return Operators.LT;
-    case '<=' : return Operators.LE;
-    case '==' : return Operators.EQ;
-    case '!=' : return Operators.NEQ;
-    case 'and' : return Operators.AND;
-    case 'or' : return Operators.OR;
-    case 'not' : return Operators.NOT;
-  }
-}

+ 0 - 22
ivprog_contexto/js/ast/sourceInfo.js

@@ -1,22 +0,0 @@
-export class SourceInfo {
-
-  static createSourceInfo (token) {
-    return new SourceInfo(token.line, token.column, token.text.length);
-  }
-
-  static createSourceInfoFromList (tokenA, tokenB) {
-    const line = tokenA.line;
-    const column = tokenA.column;
-    // copied from https://github.com/UNIVALI-LITE/Portugol-Studio/blob/master/core/src/main/java/br/univali/portugol/nucleo/analise/sintatica/Portugol.g
-    // No idea why...
-    const size = tokenB.tokenIndex + 1 - tokenA.tokenIndex
-    return new SourceInfo(line, column, size);
-  }
-
-  constructor (line, column, size) {
-    this.line = line;
-    this.column = column;
-    this.size = size;
-  }
-
-}

+ 0 - 0
ivprog_contexto/js/iassign-integration-functions.js


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác