Skip to content

harsha0609/A-Different-Language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A-Different-Language

The language is created using parse tree,lexical generators like Bison and Lex.

features such as evaluating an expression , basic arithmetic operations(+,-,*,/) , if condition , while loop

It considers context free grammar(CFG)

The CFG used in this language is :

    <expr> := [ <op> <expr> <expr> ] | 
                 <symbol> | <value>
    <symbol> := [a-zA-Z]+
    <value> := [0-9]+
    <op> := ‘+’ | ‘*’ | ‘==‘ | ‘<‘
    <prog> := [ = <symbol> <expr> ] |
              [ ; <prog> <prog> ] |
              [ if <expr> <prog> <prog> ] |
              [ while <expr> <prog> ] |
              [ return <expr> ]

Running the program

To run this program use:

 bash run1
 
 ./runit
To clear all the object files and the other generated files use:
 ./clear

Releases

No releases published

Packages

No packages published