Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
165 views

Compilers Hierachy for EBNF notation

I am developing a new programming language for my university assignment, in which I have to create it's variable definition form based on the instructions I am given by. As soon as, I create them I ...
Alex_Pap's user avatar
  • 484
0 votes
1 answer
358 views

How to fix 'unrecognized rule' and 'Fatal parse 'errors on Flex code generator?

I'm on my way to create small compiler for a general algorithmic code in French by using Flex/Lex , I don't know the real concept of it and some base notation... Here is the Flex code: %{ #include "...
wissam_bouattou's user avatar
-1 votes
1 answer
686 views

Error detection in compilers

I am learning about compilers, specifically looking at 2-phase compilers, and am confused on the certain phases where errors are detected. Let's say we have something like: int x, y; x = x + y + z; ...
GenericUser01's user avatar
2 votes
2 answers
412 views

At what stage is error thrown?

Compilation generally occur in several stages:lexical analysis, syntax analysis, etc. Say, in C language, I wrote a=24; without declaring a as int. Now, at what stage of compilation an error is ...
AV94's user avatar
  • 1,814
0 votes
3 answers
89 views

Compiler Constuction

I am doing Compiler design and construction. I've been wondering why do we actually need six phases in compilers. could some one please point out some advantages of having a number of phases in ...
Lucy's user avatar
  • 491
0 votes
1 answer
202 views

linking not done issue in flex

I am trying to make an object file via "cc -c -o " but I get the following statement ,what should I do to solve this,thanks in advance ~/hedor1>lex -t example.l > example.c ~/hedor1>cc -c -o ...
flashdisk's user avatar
  • 3,850
8 votes
4 answers
27k views

Is it possible to compile c code using python?

I want to build a python program that get as input a path to .c file and then it compile its. The program will output OK to the screen if the compilation is sucessful, and BAD otherwise. I'm been ...
RanZilber's user avatar
  • 1,950