x544d / algo2c Goto Github PK
View Code? Open in Web Editor NEWFull Python Engine to convert Algorithm(french/Moroccan) to an actual C code .
Full Python Engine to convert Algorithm(french/Moroccan) to an actual C code .
################### Types de Variables ##################### ## ------------------------------------------------------ ## ## char : 1 seul character Exmple : 'a' .. 'b' ..'*' etc ## ## string : Chaine de charactere ## ## entier : nombre entier Exmple : 1 2 3 4 ..etc ## ## reel : nombre reel kay9bel Entier w a3dad b fasila ## ## reelf : nombre reel mais ty9bl a3dad li b fasila safi ## ## bool : Boolaine .. Vrais - Faux ## ## ------------------------------------------------------ ## ############################################################ ## Darori tkhdem exactement b had les regles ## ## Darori t7tarm les syntax - Majiscule-Miniscule(mazal ghadi ytad) ## ## Darori tketbo ; apres Ecrire w Lire ..etc ## ## Declaration dyal Variables ta7t Debut ## ## Declarer les variables haka : type x,y; ## ## Si ..SinonsSi .. Sinon ..Selon .. dima 7arf lwl dyal Kelma Majiscule ## ## Algo khasha tsali b Fin ## #################################### ## Exmple : ## ## ------------------------------ ## ## Debut ## ## entier a; #### hadi Declaration dyal variable a de type Entier ## Ecrire("Donnez un Nombre : "); #### Ecrire n E kbira w f la fin kayn ; ## Lire(a); #### Lire L kira w f la fin ; ## Si(a <= 10) Alors: #### Si ..SinonSi ..Sinon kimma 9arana Mr.Fahimi ## Ecrire("Bien jouer"); ## ## SinonSi(a <= 50) Alors: ## ## Ecrire("Wow"); ## ## Sinon ## ## Ecrire("Rip"); ## ## FinSi ## ## Fin ## ## ------------------------------ ## #################################### ########################## TO DO NEXT / LATER ######################### ##################################################################### 1 > Probelem in Algo'S Vars : lets say our variable is 'a' of type int and we have another variable declared named 'atest' of type double when we search in the Table of all algo File's vars generated , to get the type of variable 'a' .. we get the 'atest' since 'a' is in 'atest'. 1 > [Solution that might work] We need to get the len(var) to get the exact length , then we compare it with the length founf on our vars Table ! ##################################################################### 2 > Problem in Replacing Multiple Lire(: For example we have Lire(a); with a int and after that we have Lire(b); with B double when generating the main.c file both of these gets replaced with : scanf("%lf",&var) .. instead it has to be %lf for double(reel) vars and %d for entier(int) vars. 2 > [Solution possible] in words[] i think it replaces every Lire( with the last Lire()'s infos found in the file .. probably i gtta replace while searching in the file for Lire( in for loop using str.replace(old,new,max) // max to replace must be once to replace only the first found with it's var types then go next and replace it depends on if() statements types of that algo var ! ##################################################################### #####################################################################
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.