2 Pages

phase1

Course: CS 441, Fall 2009
School: Cal Poly Pomona
Rating:
 
 
 
 
 

Word Count: 722

Document Preview

Phase Project 1 CS 441 Fall 1992 Craig A. Rich A Pure Lisp interpreter will be constructed of several packages in two phases. In order to insure synchronization of the phases, the constants and types which are used throughout the interpreter will be specified in a separate LANGUAGE package to be used by most others. The visible entities of each package will also be specified, controlling the interaction between...

Register Now

Unformatted Document Excerpt

Coursehero >> California >> Cal Poly Pomona >> CS 441

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Phase Project 1 CS 441 Fall 1992 Craig A. Rich A Pure Lisp interpreter will be constructed of several packages in two phases. In order to insure synchronization of the phases, the constants and types which are used throughout the interpreter will be specified in a separate LANGUAGE package to be used by most others. The visible entities of each package will also be specified, controlling the interaction between packages. This can be implemented using module extensions available in Vax Pascal, standard packages available in Ada, or classes available in C++. Language and Lexical Analyzer Notes 1. I have compiled the source files for the LANGUAGE and LEXICAL_ANALYZER packages and the compilation products are available for linking, so you should not create these source files. The object files and compilation unit files produced from the Ada source files reside in the library [cs.carich.adalib]. The object files and environment files produced from the Pascal source files are: [cs.carich]language.obj [cs.carich]language.pen [cs.carich]lexical_analyzer.obj [cs.carich]lexical_analyzer.pen Lexical Analyzer Notes 1. The lexical analyzer reads source code from the standard input file, which must be defined to a physical file before you run your interpreter. Invocations of NEXT_TOKEN will return successive tokens recognized in the source code. 2. If an identifier lexeme consisting of a letter followed by zero or more letters or digits is seen, NEXT_TOKEN will return a token whose SYMBOL is id; the identifiers T, NIL, QUOTE, CAR, CDR, CONS, EQ, ATOM, COND, LABEL, and LAMBDA are reserved and NEXT_TOKEN will return a token whose SYMBOL is T, NIL, QUOTE, CAR, CDR, CONS, EQ, ATOM_t, LABEL, or LAMBDA, respectively. In the Pascal implementation, identifiers longer than MAX_STRING_LENGTH will be truncated. Letters occurring in identifiers may be upper or lower case and will be converted to upper case. If the lexemes ( or ) are seen, NEXT_TOKEN will return a token whose SYMBOL is '(' or ')', respectively. If a comment lexeme beginning with { and ending with } is seen, NEXT_TOKEN will ignore and bypass it. If no lexemes remain, NEXT_TOKEN will return a token whose SYMBOL is '$'. Lexemes may be separated by any number of blanks, horizontal tabs, or carriage Implementation returns. Stack Notes 1. Implement the specified stack operations, using an implementation which does not bound the number of elements on the stack. Each element will contain a TOKEN and a SET_OF_ITEMS--representing grammar symbols in a parse tree which is being constructed "bottom-up" and the current state of a DFA which is recognizing viable prefixes of right sentential forms. Syntax Analyzer Implementation Notes 1. Complete the implementation of an SLR syntax analyzer which accepts Pure Lisp programs generated by the CFG in homeworks 1 and 2. 2. The productions P and SLR(1) parse table M constructed in homework 2 should be declared globally in the syntax analyzer. Their values may be initialized by declaration or by loading from external files. Their values should not be initialized by successive assignment statements. Appropriate external files are: [cs.carich]ada_productions.dat [cs.carich]ada_parsetable.dat [cs.carich]pascal_productions.dat [cs.carich]pascal_parsetable.dat 3. The syntax analyzer should output "shift" followed by the symbol in TERMINAL which is being shifted whenever a shift occurs. It should output "reduce" followed by the production (not its number) which is being used whenever a reduce occurs. Note that the sequence of reduce productions is the reverse sequence of produ...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Cal Poly Pomona - CS - 441
MidtermCS 441 Spring 1992 Craig A. RichName: 1 Let N = (ITEMS, , , i0 , F ) be the NFA that is constructed from the following CFG after steps III of the SLR syntax analyzer construction. S A B C a) Compute (A B, ). A|C AcB | AaC | B | a Bb |
Cal Poly Pomona - CS - 441
Project Phase 2CS 441 Spring 1993 Craig A. RichConsider the S-attributed syntax-directed denition for Pure Lisp, in which most grammar symbols have one associated attribute of type TREE and each production has one associated semantic rule. The se
Cal Poly Pomona - CS - 441
Final ExamCS 441 Fall 1991 Craig A. RichName: 1 Consider the following CFG G which generates a language of tours: Tour | Tour Move ; Move rotate literal | walk literal Construct an S-attributed attribute grammar from the underlying CFG G which
Cal Poly Pomona - CS - 441
Project SDDCS 441 Fall 1992 Craig A. RichThe following S-attributed syntax-directed denition denes Pure Lisp, in which most grammar symbols have one associated attribute and each production has one associated semantic rule. All attributes are of
Cal Poly Pomona - CS - 441
Project SDDCS 441 Winter 1994 Craig A. RichThe following S-attributed syntax-directed denition denes Pure Lisp, in which most grammar symbols have one associated attribute and each production has one associated semantic rule. All attributes are o
Cal Poly Pomona - CS - 441
Computer Science 441 (Section 1CRN 20816) (Section 2CRN 20817) Spring 1993 Compiler Design Instructor Craig A. Rich Oce: Bldg. 8, Room 40 Oce Hours: Mon,Wed 23:30; Tue,Thu 1112 Phone: (909)869-3447 Electronic mail: carich Section 1Lecture Meetings Ti
Cal Poly Pomona - CS - 441
Homework 3CS 441 Spring 1995 Craig A. Rich1 Given the following SDD: Productions LLS L S W C loop L end loop ; S id := E ; W while CE <E EE +T ET T T F T F F (E ) F id F literal Semantic Ruleswriteln (GOTO top); write (end: ); writeln (STO
Cal Poly Pomona - CS - 441
Homework 3CS 441 Fall 1994 Craig A. Rich1 Given the following SDD: Productions LLS L S W C loop L end loop ; S id := E ; W while CE <E EE +T ET T T F T F F (E ) F id F literal Semantic Ruleswriteln (GOTO top); write (end: ); writeln (STORE
Cal Poly Pomona - CS - 441
Computer Science 441 Section 1 (CRN 12013) Winter 1994 Compiler Design Instructor Craig A. Rich Oce: Bldg. 8, Room 40 Oce Hours: Mon,Wed 10:3012; Tue,Thu 12 Phone: (909)869-3447 Electronic mail: carich@csupomona.edu Lecture Meetings Time: Mon,Wed,Fri
Cal Poly Pomona - CS - 441
Computer Science 441 Section 1 (CRN 41964) Fall 1994 Compiler Design Instructor Craig A. Rich Oce: Bldg. 8, Room 40 Oce Hours: Mon,Wed 1112; Tue,Thu 2:304 Phone: (909)869-3447 Electronic mail: carich@csupomona.edu Lecture Meetings Time: Tue,Thu 4:005
Cal Poly Pomona - CS - 441
Computer Science 441 Section 1 (CRN 20816) Spring 1995 Compiler Design Instructor Craig A. Rich Office: Bldg. 8, Room 40 Office Hours: Mon,Wed 1112; Tue,Thu 2:304 Phone: (909)869-3447 Electronic mail: carich@csupomona.edu Lecture Meetings Time: Mon,W
Cal Poly Pomona - CS - 441
MidtermCS 441 Spring 2001 Craig A. RichProblems 12 refer to the following CFG G: S AB A aBb | B Cc | c CB1 SLR(1) Parse Table Construction a) Construct the canonical collection C of sets of LR(0) items which results from G after steps IIII
Cal Poly Pomona - CS - 441
Project SDDCS 441 Winter 1991 Craig A. RichThe following S-attributed syntax-directed denition denes pure Lisp, in which each grammar symbol has one associated attribute named attr and each production has one associated semantic rule. All attribu
Cal Poly Pomona - CS - 441
Computer Science 441 (CS 8944101) Fall 1991 Compiler Design Instructor Craig A. Rich Oce: Bldg. 8, Room 40 Oce Hours: Mon,Wed 12:001:00; Tue,Thu 1:002:30 Phone: (714)869-3447 Lecture Meetings Time: Mon,Wed,Fri 2:153:20 Place: Bldg. 8, Room 347 Textbo
Cal Poly Pomona - CS - 441
Project Phase 1 Pascal SpecificationsCS 441 Fall 1992 Craig A. Richlanguage.pas[environment] module LANGUAGE; const MAX_STRING_LENGTH = 30; MAX_alpha_LENGTH = 7; MAX_PRODUCTIONS_LENGTH = 24; type NATURAL = 0.MAXINT; STRING = varying [MAX_STRING_
Cal Poly Pomona - CS - 441
Computer Science 441 (CS 8944101) Winter 1991 Compiler Design Instructor Craig A. Rich Oce: Bldg. 8, Room 40 Oce Hours: Tue,Thu 9:0010:00; Wed,Fri 10:3012:00 Phone: (714)869-3447 Lecture Meetings Time: Tue,Thu 10:0011:50 Place: Bldg. 3, Room 214 Text
Cal Poly Pomona - PHY - 132
Cal Poly Pomona - PHY - 132
Cal Poly Pomona - PHY - 121
Phy 121L/131LPre-Lab: Conserved QuantitiesName:= Choose the best answer. Refer to the lab manual for the definitions of the variables used below. (10 pts total) 1. In Part 1, what is h? [1 pt] a. the height of the block above the table at the b
Cal Poly Pomona - PHY - 133
Physics 133 NameFinal ExamFall 2000PLEASE READ THIS FIRST: Work the problems on separate sheets of paper and staple this sheet to the front. Read each problem carefully. Show your work and/or give explanations for all answers. Make sure that al
Cal Poly Pomona - EC - 201
WHAT IS A COMPETITIVE MARKET? A perfectly competitive market has the following characteristics: There are many buyers and sellers in the market. The goods offered by the various sellers are largely the same. Firms can freely enter or exit the mar
Cal Poly Pomona - PHY - 133
Physics 133Problem Set #10Professor MallinckrodtNote: You should always work though the relevant examples in the text before attempting the homework problems. You may also want to work out some of the odd black end of the chapter problems which
TCNJ - CSC - 460
CSC460 (Spring 2005) Module A Evaluation FormName Self-evaluation (A, B, C possibly with +/) Adjustment by the instructorEvaluation Materials (Portfolio)Your evaluation materials (referred to as portfolio, and to be placed in the provided manila
TCNJ - CSC - 460
CSC460Name: _Exercise A6/B0, 2/8/05 Part 1: Simulating a TM Using a TMIn Module A, we discussed our intuition that the halting problem is semi-decidable and infinite-loop detection is non-TM-recognizable. In either case, it would be impossible t
TCNJ - CMSC - 250
he task: create a "shell" that will handle the mechanics of providing drill intruction ineither arithmetic or spelling. Implement a second system prototype that demonstrates the key features of the enhancements. MathDrill enha
Cal Poly Pomona - PHY - 133
Physics 133Problem Set #3Professor MallinckrodtNote: You should always work though the relevant examples in the text before attempting the homework problems. You may also want to work out some of the odd black end of the chapter problems which
TCNJ - ANSWE - 06
COMMUNICATION SKILLSVerbal Presentation1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26Non Verbal E x Score 4.00 3.50 5.00 5.00 4.00 4.50 4.50 3.50 3.00 3.50 5.00 3.00 2.50 4.00 4.00 3.50 3.00 3.00 4.00 5.00 3.50 4.50 2.50 3.
Cal Poly Pomona - URP - 337
URP 337 Planning public infrastructureWastewater and Laws about property-based taxesLecture 6 30 April 2001Number of governments in CaliforniaSchool districtsBut first Special districts notes on in-class assignment1New bond issues ($bill
Cal Poly Pomona - CS - 664
As the limitations of traditional silicon based digital logic are reached in the effort to produce faster more powerful computers, new technologies promise the possibility of overcoming current hurdles. One possibility being researched is quantum com
Cal Poly Pomona - CS - 499
!"#! $ ! $& !"$## $"$# %$"'(*")% & % $ # & +# #, " # '0 #). / ).. # " $ $ # . )-# / /)"$)1 "$ 5 # " 4 $ / $ # 2 # $ / - "$ 3 40$" $ $4#"$ $.5 . #* 6 3$ # $$ 4 $ $)$)# -/ 4 " # 3 #
Cal Poly Pomona - EVENTS - 2
GROUP MEMORY: The Core Values of a Learning-Centered UniversityAt the April 22 Retreat on Becoming A Learning-Centered University, 40 students, 29 faculty, and 35 staff engaged in a shared activity to identify the core values of a learning-centered
Cal Poly Pomona - ECE - 322
P. R. Nelson1ECE 322L Experiment 1 Matlab Plotting and Curve Fitting: From Data to a Simple spice Model of an LED 1 Objectives using Matlab to fit a model to data, preparing graphs for professional reports.The objectives of this lab are to be
Cal Poly Pomona - ECE - 322
P. R. Nelson1ECE 322: Operational Ampliers and Electronic FeedbackHomework Assignment 1 Due Monday, 6 October1. Find the voltage V1 (a) from KVL and Ohms law. (b) from KCL and Ohms law. (c) by voltage division. (d) using superposition. 2. Find
Cal Poly Pomona - ECE - 330
Introduction to ECE 330Phyllis R. Nelsonprnelson@csupomona.eduProfessor, Department of Electrical and Computer Engineering California State Polytechnic University, PomonaP. R. Nelson ECE 330 Spring 2009 p. 1/19ECE 330 is aboutThe physics
Cal Poly Pomona - ECE - 322
P. R. Nelson1ECE 322L Experiment 2: Op Amp DC Characterization ICorrected version 5 October 20081Objectives measure DC op amp parameters compare the results to device specications develop experience with op amp circuits.The objectives o
Cal Poly Pomona - ECE - 220
P. R. Nelson1ECE 220: Electronic Devices and CircuitsGeneral InformationClass meets: Monday and Wednesday from 10:00 to 11:50 in 9-401 Instructor: Prof. Phyllis R. Nelson Oce: 9-131, email: prnelson@csupomona.edu, phone: (909) 869-2649 (email
Cal Poly Pomona - ECE - 322
Introduction to ECE 322Phyllis R. Nelsonprnelson@csupomona.eduCo-Director, Center for Macromolecular Modeling and Materials Design Professor, Department of Electrical and Computer Engineering California State Polytechnic University, PomonaP. R.
Cal Poly Pomona - ECE - 322
P. R. Nelson1ECE 322: Operational Ampliers and Electronic FeedbackGeneral InformationClass meets: Monday and Wednesday from 8:00 to 9:50 in 9-401 Instructor: Prof. Phyllis R. Nelson Oce: 9-131, email: prnelson@csupomona.edu, phone: (909) 869-2
Cal Poly Pomona - ECE - 322
P. R. Nelson Name(s):1ECE 322L Experiment 2 Op Amp DC Characterization I Scoring RubricAbsent/Minimal Prelab 2-5 (each) (Total: 8) Output Swing circuit data discussion Open Loop Gain circuit data discussion TOTAL none 0 not labeled 0-4 none 0 n
Cal Poly Pomona - ECE - 330
330-lect01.texPage 1ECE 330 Lecture 1Crystal StructureECE330 - Introduction to Semiconductor DevicesPhyllis R. Nelson330-lect01.texPage 2States of MatterECE330 - Introduction to Semiconductor DevicesPhyllis R. Nelson330-lect01.t
Cal Poly Pomona - ECE - 220
P. R. Nelson1ECE 220: Electronic Devices and CircuitsHomework Assignment 1 Due Monday, 6 October1. Find the voltage V1 (a) from KVL and Ohms law. (b) from KCL and Ohms law. (c) by voltage division. (d) using superposition. 2. Find the current
Cal Poly Pomona - ECE - 322
P. R. Nelson1ECE 322L: Operational Ampliers and Electronic Feedback LaboratoryGeneral InformationClass meets: Tuessday 9:00 - 11:50 in 9-431 Instructor: Prof. Phyllis R. Nelson Oce: 9-131, email: prnelson@csupomona.edu, phone: (909) 869-2649 T
Cal Poly Pomona - ECE - 322
P. R. Nelson1ECE 322L: Operational Ampliers and Electronic Feedback LaboratorySyllabusLab 1 2 3 4 5 6 7 8 9 Date 9/30 10/7 Experiment Matlab Plotting and Curve Fitting Op Amp DC Characterization I10/14 Op Amp DC Characterization II 10/21 Op
Cal Poly Pomona - ECE - 322
P. R. Nelson1ECE 322: Operational Ampliers and Electronic FeedbackSyllabusDate 9/29 10/1 10/6 10/8 Topics, Assignments Introduction, spice, Matlab Op amp introduction Nonideal op amp - denitions, models, analysis methods Homework 1 due Op amp
TCNJ - BOTTI - 4
Elements and Principles of DesignKR I STYN B O TTI S E P TEM B ER 8 , 20 0 8 ETE 26 1UNITYHollister shows unity in their girls clothing line by adding a small seagull somewhere on all of the articles of clothing.VarietyThis advertisement sho
Cal Poly Pomona - UNIT - 1
name _The quarter is under the table.The table is with the car.The jar is not under the table.The boy has a table and a kite.Worksheet 1-30A: Read the sentences and then cut and paste. New word: table
Cal Poly Pomona - UNIT - 1
name _inkiteseekiteduckgirlkitegirlinkiteinkiteseeduckkitekiteinkiteduckhousegirlduckkitekiteduckduckkitetheinkiteWorksheet 1-23A: Circle all the words kite. New word: kite
Cal Poly Pomona - UNIT - 3
name _boycatseecatcangirlcatgirlcancatboycatseecancatcatboycatcanhousegirlcancatcatcancancattheboycatWorksheet 3-9B: Circle all the words can. New word: can
Cal Poly Pomona - UNIT - 3
name _boycatseecatcargirlcatgirlcarcatboycatseecarcatcatboycatcarhousegirlcarcatcatcarcarcattheboycatWorksheet 3-4B: Circle all the words cat. New word: cat
Cal Poly Pomona - UNIT - 3
name _boymatseematmangirlmatgirlmanmatboymatseemanmatmatboymatmanhousegirlmanmatmatmanmanmattheboymatWorksheet 3-10B: Circle all the words man. New word: man
Cal Poly Pomona - UNIT - 1
name _The boy put the pencil in the box.The girl put the apple in the box.I see a little car and a pencil.The boy put the flower in the house.Worksheet 1-17A: Read the sentences and then cut and paste. New word: put
Cal Poly Pomona - UNIT - 1
name _I see a pencil in the box.I see a flower in the house.I see a boy in the car.I see the apple in the box.Worksheet 1-16A: Read the sentences and then cut and paste. New word: in
Cal Poly Pomona - UNIT - 1
name _I see a girl.I see a flower and a pencil.I see a boy and a girl.I see a house and a flower.Worksheet 1-9A: Read the sentences and then cut and paste. New word: I
Cal Poly Pomona - UNIT - 1
name _I see the little apple.I see the little flower.The boy and girl see the little house.I see the little car.Worksheet 1-13A: Read the sentences and then cut and paste. New word: little
Cal Poly Pomona - UNIT - 1
name _The duck is in the box.The pencil is little.The box is under the car.The girl is in the house.Worksheet 1-20A: Read the sentences and then cut and paste. New word: is
Cal Poly Pomona - UNIT - 1
name _I see the apple.The boy and girl see the apple.I see the girl and the pencil.I see the boy and the apple.Worksheet 1-12A: Read the sentences and then cut and paste. New word: apple
Cal Poly Pomona - UNIT - 1
name _A girlA girl and a flowerSee a girl and a pencilSee a house and a flowerWorksheet 1-8A: Read the sentences and then cut and paste. New word: girl
Cal Poly Pomona - UNIT - 1
name _The girl has a valentine and a duck.The boy has a kite.The boy has a little car.The girl has a little house.Worksheet 1-25A: Read the sentences and then cut and paste. New word: has
Cal Poly Pomona - UNIT - 1
name _A pencilA pencil and a carSee a house and a carSee a house and a pencilWorksheet 1-6A: Read the sentences and then cut and paste. New word: and
Cal Poly Pomona - UNIT - 2
name _The zebra and the duck see a kite.The zebra is with a boy and a girl.Worksheet 2-36C: Read the sentences and then draw the pictures. New Letter: z
Cal Poly Pomona - UNIT - 2
name _My red flower is in the house.The girl put the valentine in the house.Worksheet 2-10B: Read the sentences and then draw the pictures. New Letter:h