Skip to content

mercurial-moon/EngScript

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EngScript is an intuitive and extensible English-like programming language.

EngScript is a dialect of the English language that can be automatically translated into Python code. In other words, you can write programs in plain English and automatically compile them to Python code.

It's MIT-licensed, so it can be used in open-source software projects as well as commercial ones.

For a working demo of EngScript, see main.py.

The language's grammar is defined in englishToPython.py.

Some useful code samples:

#Print the first 3 letters of a word
print (the first 3 letters of "Hello")

#Repeat an action a certain number of times.
repeat 3 times:
	print "Hello!"

#Check whether a number is prime
x = 15

if ((x is a prime number) or (x is divisible by 5)) :
	print x

#Create a string from a file
print{create a string from the file called "README.txt"}

#Save a string as a file
print{save the string "Woohoo!" to a file called "ExampleText.txt"}

#Get the first few letters of a string
print{the first 3 letters of "EngScript"}
#This prints "Eng".

About

This project is now obsolete. Some alternatives can be found here: https://github.com/pannous/english-script and also here: https://github.com/percyliang/sempre

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Other 0.2%