Browse Source

Translate english grammer for the new commands structure and reference operator

Lucas de Souza 4 years ago
parent
commit
db1e42f502
3 changed files with 35 additions and 11 deletions
  1. 28 4
      grammar/en/ivprog.g4
  2. 4 4
      grammar/en/langFunctions.js
  3. 3 3
      grammar/en/langLibs.js

+ 28 - 4
grammar/en/ivprog.g4

@@ -14,7 +14,7 @@ RK_VOID
   ;
 
 RK_BOOLEAN
-  : 'boolean'
+  : 'bool'
   ;
 
 RK_STRING
@@ -22,11 +22,11 @@ RK_STRING
   ;
 
 RK_INTEGER
-  : 'integer'
+  : 'int'
   ;
 
 RK_CHARACTER
-  : 'character'
+  : 'char'
   ;    
 
 RK_SWITCH
@@ -57,18 +57,42 @@ RK_FOR
   : 'for'
   ;
 
+RK_FOR_ALT
+  : 'repeat_for'
+  ;
+
+RK_FOR_FROM
+  : 'from'
+  ;
+
+RK_FOR_TO
+  : 'to'
+  ;
+
+RK_FOR_PASS
+  : 'pass'
+  ;
+
 RK_BREAK
   : 'break'
   ;
 
 RK_DO
-  : 'do'
+  : 'repeat'
+  ;
+
+RK_DO_UNTIL
+  : 'until'
   ;
 
 RK_WHILE
   : 'while'
   ;
 
+RK_WHILE_ALT
+  : 'repeat_while'
+  ;
+
 RK_IF
   : 'if'
   ;

+ 4 - 4
grammar/en/langFunctions.js

@@ -7,10 +7,10 @@ export default {
   $numElements: "total_of_elements",
   $matrixLines: "total_of_lines",
   $matrixColumns: "total_of_columns",
-  $substring: "subcadeia",
-  $length: "comprimento",
-  $uppercase: "caixa_alta",
-  $lowercase: "caixa_baixa",
+  $substring: "substring",
+  $length: "length",
+  $uppercase: "uppercase",
+  $lowercase: "lowercase",
   $charAt: "char_at",
   $isReal: "is_real",
   $isInt: "is_integer",

+ 3 - 3
grammar/en/langLibs.js

@@ -3,8 +3,8 @@
  */
 export default {
   $mathLib: "Mathematic",
-  $ioLib: "ES",
-  $strLib: "Texto",
-  $arrayLib: "Arranjo",
+  $ioLib: "IO",
+  $strLib: "Text",
+  $arrayLib: "Array",
   $langLib: "Conversion"
 }