-
What tokens would be produced by the Cavy lexical analyzer
given this input:
int answer;
answer = 42;
put_i(i);
-
A commonly used measure of program size is the number
of semi-identifiers it contains. Words in strings, comments,
should not be counted.
Write a program which prints the number of identifiers in a specified Cavy program.
For example:
% ./a.out /home/cs1721/public_html/05s2/cavy/examples/3/selection_sort.c
29
-
We need to keep an int value associated with a name (string).
Write a function which given a name (char *) returns a pointer (int *)
to the int variable associated with that name.
If the name has not been previously associated
with an int variable, an int variable should be created (malloc'ed)
and initialized to zero.