Language Design

Job ID: 33587456

Budget: $30 – $250 USD

We want to create a programming language, one which language its written, its not that important, but we would like it to be in python. We would want the language to do certain things:
1) implementing a program that accepts the path to a source file containing an arithmetic expression on any valid real numbers in infix notation. The program should be capable of parsing the contents of the input file, executing its expressions, and printing the product. parser should – at a minimum – handle unary negation and binary addition, subtraction, multiplication, and division. With any combination of these arithmetic operators, your parser should be capable of producing correct outputs. Example inputs that you will want to test against include but are not limited to:
1 – 2
2.5 + 2.5 - 1.25
(10 * 2) / 6
8.5 / (2 * 9) - -3
A popular approach to handle the storing of data for the computation is to parse the symbols to an imaginary instruction set and then execute them one-by-one (a virtual machine). Another approach is to parse the symbols into a tree of nodes and traverse it, executing the logic defined in each node (an abstract syntax tree).
2) Booleans are foundational to all conditional logic in programming languages and will be necessary for control flow functionality introduced in later stages. After implementing support for numbers, further extend it to support Booleans and Boolean-producing expressions.
parser should – at a minimum – handle:
· Binary comparison, equality, and inequality between numbers.
· Binary equality and inequality between Booleans.
· Logical “AND” and “OR” between Booleans.
· Unary negation of Booleans.
With any combination of the above arithmetic expressions, parser should be capable of producing correct outputs. Example inputs that you will want to test against include but are not limited to:
true == false
true != false
(5 < 10)
!(5 – 4 > 3 * 2 == !false)
true and true
false and true
(0 < 1) or false
false or false
These are some of what we're looking to implement, for more information of what more to implement message me as I'm not able to list everything here :)
Related categories: Python Software Development Coding Programming