Find Jobs
Hire Freelancers

Symbol Tables

$30-5000 USD

Dokončeno
Zveřejněno přibližně před 22 roky

$30-5000 USD

Zaplaceno při doručení
Programming Languages Assignment 3 Symbol Tables Write a program in your favorite programming language that will maintain a symbol table for a simple, block structured language (actual informal description given below). Your program will act like a simple compiler (but will only maintain a symbol table). Take your input from a file, a sample of which you can get from me as [login to view URL] In this language, every line is either proc_somename, or end, or a Pascal-like variable declaration in the form var:type There are no begin(s) in this language. To keep it simple, there are no spaces anywhere except at the beginning of a line. To get a procedure name, pick off everything after 'proc_' when you see it. Procs can be nested inside of other procs, and the scope rules are just like Pascal, except that anything that is outside of ANY proc is just 'global'. When you see a line with a ':' in it, that is a variable declaration -- just pick off the name as everything before the colon and the type as everything after. You need to mainain a stack of procedure names, so you can always know the current 'scope'. Push 'global' onto this stack at first; then anytime you see a new proc name, push that, and when you see 'end' just pop the proc name stack. In this way the current scope is always the top of that stack. Maintain your symbol table as a linked list of nodes; each node will have in it a unique identifier name. When an identifier is found, you look for it in your linked list; if not found then you add it as a new node to your list. Each linked list node will contain a stack (or a pointer to a stack) which will contain the attributes for the identifier, such that the current attributes can always be gotten as the top of that stack. An attribute will be maintained as 2 strings, one being the 'scope' (i.e. global, proc_a, etc) and the other being the type (integer, real, etc). When you reach end of file, just output your symbol table at that time. Print out each identifier along with its stack of attributes, in a reasonable format (label it!). Use of abstract data types will help you greatly in this program - you need to set up a way to manipulate stacks and linked lists more or less generically. Also, if the program compiles and runs well, please send me the output of it because I might not have to compiler software to compile and run this program ## Deliverables Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased. ## Platform I have the visual C++ compiler, using window ME, anyway if you can write in C++, it'll be great(I dont know if it fits the description of my instructor requirements. IF not, you can write in your favorite language, be sure to send me the out put of it. Here is the file you need( i copied it directly from my instructor 's site [login to view URL] pi:real index:integer proc_A x:real y:integer alpha:char proc_B x:integer end end beta:char gamma:real ## Deadline information Please complete and send to me ontime(due date: 3/6/2002)
IČ projektu: 2840968

O projektu

11 nabídky
Vzdálený projekt
Aktivní před 22 roky

Chcete si vydělat nějaké peníze?

Výhody podávání nabídek na Freelancer

Stanovte si rozpočet a časový rámec
Získejte za svou práci zaplaceno
Načrtněte svůj návrh
Registrace a podávání nabídek je zdarma
Uděleno:
Avatar uživatele
See private message.
$25,50 USD v 14 dnech
5,0 (139 recenze)
7,1
7,1
11 freelanceři nabízejí v průměru $53 USD za tuto práci
Avatar uživatele
See private message.
$25,50 USD v 14 dnech
5,0 (80 recenze)
5,2
5,2
Avatar uživatele
See private message.
$51 USD v 14 dnech
5,0 (60 recenze)
5,0
5,0
Avatar uživatele
See private message.
$59,50 USD v 14 dnech
4,4 (72 recenze)
5,5
5,5
Avatar uživatele
See private message.
$127,50 USD v 14 dnech
4,9 (25 recenze)
4,6
4,6
Avatar uživatele
See private message.
$51 USD v 14 dnech
4,9 (35 recenze)
3,9
3,9
Avatar uživatele
See private message.
$42,50 USD v 14 dnech
5,0 (7 recenze)
3,4
3,4
Avatar uživatele
See private message.
$38,25 USD v 14 dnech
4,5 (17 recenze)
3,3
3,3
Avatar uživatele
See private message.
$55,25 USD v 14 dnech
4,5 (15 recenze)
2,7
2,7
Avatar uživatele
See private message.
$17 USD v 14 dnech
5,0 (3 recenze)
1,8
1,8
Avatar uživatele
See private message.
$85 USD v 14 dnech
0,0 (1 recenze)
0,8
0,8

O klientovi

Pochází z UNITED STATES
United States
5,0
25
Členem od zář 16, 2001

Ověření klienta

Díky! Poslali jsme vám e-mailem odkaz pro získání kreditu zdarma.
Při odesílání e-mailu se něco pokazilo. Zkuste to prosím znovu.
Registrovaných uživatelů Zveřejněných projektů
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Načítání náhledu
Bylo uděleno povolení ke geolokaci.
Vaše doba přihlášení vypršela a byli jste odhlášeni. Přihlaste se znovu.