This page will be updated throughout the project period when relevant.
Note that questions related to the exam can be found on a separate
page via the
exam page, or via
this direct link.
Can we have the LaTeX source for the official front page
so we can insert the group information electronically?
I use the flag "-lfl", so why won't my Flex program compile?
It says in the Flex documentation that you should link
to Flex when compiling the C-program it has created,
gcc the flag
However, this does not seem to be necessary and may give
more problems than it solves.
Among other things,
libfl.a defines a main function.
So if you have defined a main function yourself, it won't compile.
Consider not using that flag.
Why does Flex keep complaining about "yywrap"?
Flex wants you to define a yywrap function to tell Flex
what to do when it has read through the (first) input file.
This function is often not needed; partly because there's
often just one input file. One way to stop the complaining
is to write
%option noyywrap in the top of your
lex file. In fact, to stop further warnings, you can write
%option noyywrap nounput noinput and declare
a function as external:
extern int fileno();.
Can we have the LaTeX source code for the grammar?
Bison indicates a default case, but it is not using it!
When considering the .output file, which Bison can generate for
debugging purposes, some states end with a default statement.
However, this should be read as an "otherwise" in a case
statement, where the other cases consist of the listed
next symbols on input. For a concrete next symbol on input,
the action which is taken is the one not enclosed
in square brackets.
For the heap implementation, are we allowed to use malloc or
other system calls?
The intention is that you should experience managing a heap area
yourself. Thus, you must allocate a large amount of memory at start-up
and then handle memory allocation explicitly in your compiler.
This means, as a starting point, that a user program can run out of
memory. You could have a check for this and terminate
in a controlled fashion if it happens.
You can allocate the large amount of memory using the technique
the example GNU assembler program on global variables.
It is also allowed to make one (1) call to malloc to allocate
this large amount of memory once and for all.
Thus, calls to malloc or other systems call in connection with
every memory allocation for records and arrays is not accepted.
More than one call to malloc can be accepted if it is carried out
within the spirit of the above. For instance, you may allocate
a large amount of memory with malloc at start-up and whenever
you run out of memory, allocate an additional large amount of
memory using malloc again.
The important issue is that you demonstrate that you can manage
a heap yourself.
In the report template, what do you mean by "resources"?
"Resources" appears in the phase diagram that I've used because in some
situations for compilers in general, this can be an
important phase. Resources include the amount of space
you need or anything else which might be limited. For
multi-process programs, it could include the number of
processers required. For jobs released to a Grid-system,
it could be the number of machines of a certain
architecure requested to carry out a given job.
In the case of our programming language, space is the only
really interesting resource, and one would naturally assume
that there is enough. It is fine to omit that section
from the report.
How do we translate the words below, if we write our report in Danish?
["Words below" removed.]
I'll answer this question in Danish! ツ I have worked the words into
a separate page.
Last modified: Thu Apr 25 08:30:18 CEST 2013
Kim Skak Larsen