Sale!

COMP2000 Assignment 4 Cross-reference solution

$30.00 $21.00

Original Work ?

Download Details:

  • Name: COMP20002013_2014S2Assign4CrossRef-tbw4ol.zip
  • Type: zip
  • Size: 10.35 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

Name of program: crossref.c
Write a program to produce a cross-reference listing of the user identifiers in a C program.

Output consists of the given program with the lines numbered. This is followed by an alphabetical listing of the identifiers; each identifier is followed by the line number(s) in which the identifier appears.

Identifiers within string constants (delimited by double quotes) or comments (delimited by /* and */) are not to be included. Identifiers within // comments are not to be included. Identifiers within single quotes (character constants) are not to be included. Reserved words are not to be included.

Identifiers must be kept in a binary search tree and the line number(s) for a given identifier held on a linked list.

Input: List of reserved words (in no particular order and any number per line) terminated by the word ENDOFLIST. This is followed by the program to be cross-referenced.