Double Linked List



Could someone help me get started on this program or where to look to
get information, I am not sure how to put things together.

1. Create 4 double linked lists as follows:

(a) A double linked list called NAMES which will contain all C like
identifiers of less than
256 characters long identified in the input file F. Each identifier
will be represented by
a triple (I, length, string) where I is used to identify the type of
the object as being an
identifier, length is an integer representing the length of the
identifier in characters, and
string is a string of characters representing the identifier itself.

(b) A double linked list called NUMBERS which will contain all C like
numbers of less than
256 characters long identified in the input file F. Each number will be
represented by a
triple (N, length, string) where N is used to identify the type of the
objects as being a
number, length is an integer representing the length of the number in
characters, and
string is the string of characters representing the number itself.

(c) A double linked list called SEPARATORS which will contain all C
language separators
and operators identified in the input file F. Each separator will be
represented by a triple
(X, length, string) where X is S for separators, O for operators, R for
symbols denoting
relations, L for new line and E for end of file. The length is an
integer representing the
length of the symbol and string is the string of characters
representing the symbol itself.

(d) A double linked list called UNKNOWN which will contain all symbols
you discovered in
the file F which could not be classi ed in the lists NAMES, NUMBERS,
SEPARATORS.
Each object in this list will be represented by a triple (Y, length,
string) where Y is used
to signify that an unknown symbol was discovered, length is an integer
representing the
length in characters of the unknown symbol, and string is the string of
characters that
make up the unknown symbol itself.

The input file F will be an arbitrary text file in your directory. The
actions of list creation and list printing will be programmed as
functions which will be called from a main program. Use in your program
the functions list(H, T), to create an empty list L whose header is H
and tail is T, and append(L, OBJ), to append the object OBJ to the list
L.

.



Relevant Pages

  • Re: "Read stuff from a file and chop it up to do stuff" code advice wanted.
    ... had a character set without control characters, ... ;; Throw out the control character and return the chunk. ... ;; and then run my code on the text string that this code creates. ... Well, first of all, NTH is very inefficient for lists. ...
    (comp.lang.lisp)
  • Double Linked List Help
    ... 256 characters long identified in the input file F. Each identifier ... identifier, length is an integer representing the length of the ... string is a string of characters representing the identifier itself. ...
    (comp.lang.c.moderated)
  • Double Linked List Code
    ... Create 4 double linked lists as follows: ... string is a string of characters representing the identifier itself. ...
    (comp.lang.c)
  • Re: Multiple Double Linked Lists
    ... > mutiple double linked lists. ... > string is a string of characters representing the identifier itself. ... > struct Names* next; ...
    (comp.lang.c)
  • Double Linked List start Help
    ... 256 characters long identified in the input file F. Each identifier ... identifier, length is an integer representing the length of the ... string is a string of characters representing the identifier itself. ...
    (comp.programming)