Archive for the 'compiler' Category

03
May
08

COMPILADOR

COMPILADOR is a compiler for arithmetic expressions. It consists of a lexical and syntactic analyzer for a matrix of precedence. This program will check if the expression is well formed and then evaluates it. author: ezequielher

Compile using command Makefile of Linux : Download this Source Code

02
May
08

LEXICAL ANALIZER

This source checks if the operations arithmetics are well made.
It uses an matrix of transitions to know if 2 consecutive characters have consistency or not. Then it revised that all characters written by the user are permitted, (only allow digits, comma, parentheses & operations) Compilate using command gcc of Linux. author: ezequielher

prompt/> gcc lexico.c -o programa
prompt/> ./programa ‘2*3-(56*8.3)’
Show this Source code