Skip to content
Snippets Groups Projects
Commit e6d7078e authored by UNCHESEL Andrei's avatar UNCHESEL Andrei :computer:
Browse files

Commit d'avant, ajout double commentaire imbriqué + affectation avec une...

Commit d'avant, ajout double commentaire imbriqué + affectation avec une chaine de caractère impossible
ajout acceptation parenthèse dans l'input -(9)
parent e66cf283
Branches main
No related tags found
No related merge requests found
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="8237d158-eb93-4728-8aed-8c10d18a4380" name="Changes" comment="Probleme -1 resolut!"> <list default="true" id="8237d158-eb93-4728-8aed-8c10d18a4380" name="Changes" comment="Probleme -1 resolut!">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/Compilateur_TAOUREL_UNCHESEL/Lexical.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/Compilateur_TAOUREL_UNCHESEL/Lexical.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/Compilateur_TAOUREL_UNCHESEL/Syntaxique.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/Compilateur_TAOUREL_UNCHESEL/Syntaxique.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/out/production/Compilateur_TAOUREL_UNCHESEL/Syntaxique.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/Compilateur_TAOUREL_UNCHESEL/Syntaxique.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Lexical.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Lexical.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Syntaxique.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Syntaxique.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/Syntaxique.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Syntaxique.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/myappTest.txt" beforeDir="false" afterPath="$PROJECT_DIR$/src/myappTest.txt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/myappTest.txt" beforeDir="false" afterPath="$PROJECT_DIR$/src/myappTest.txt" afterDir="false" />
</list> </list>
......
No preview for this file type
...@@ -738,7 +738,8 @@ public class Syntaxique { ...@@ -738,7 +738,8 @@ public class Syntaxique {
public int lire(int i){ public int lire(int i){
int adresse =safePop(); int adresse =safePop();
Scanner sc = new Scanner(System.in); Scanner sc = new Scanner(System.in);
MEMVAR[adresse] = sc.nextInt(); String input = sc.nextLine().replaceAll("[()]", "");
MEMVAR[adresse] = Integer.parseInt(input);
return i; return i;
} }
public int ecrl(int i){ public int ecrl(int i){
......
...@@ -6,7 +6,7 @@ VAR c:=0, ...@@ -6,7 +6,7 @@ VAR c:=0,
DEBUT DEBUT
ECRIRE('write an integer:'); ECRIRE('write an integer:');
LIRE(c); LIRE(c);
v:=x*c; v:=c*c;
ECRIRE('square of your number is:',v); ECRIRE('square of your number is:',v);
ECRIRE(); ECRIRE();
FIN. FIN.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment