DOC PREVIEW
UConn CSE 4100 - Semester Project

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Semester Project – Part 1 – CSE4100 – Fall 2011Due Dates:October 5, 12, and 17 2011The project for the Fall 2011 Semester will focus on the design and implementation of a Latexsubset for text processing. I recommend that you experiment and learn about Latex using theMikTex http://miktex.org/ software package The semester project will be subdivided into threeparts:1. Part 1: Three tasks(a) Design and implement a lexical analyzer using the flex generator on the Linux boxes thatis able to identify all lexical tokens for the latex subset.(b) Design and develop a context free grammar (CFG) for a subset of Latex.(c) Calculate FIRST and FOLLOW for a grammar provided after deliverable part 1b.2. Part 2: Two tasks(a) Analyze a provided context free grammar in Bison that has a number of shift-reduce andreduce-reduce errors and rewrite the grammar into a form that removes these errors.(b) Design, implement, and test the common CFG (which we will provide to you after youturn in part 2a) using Flex and Bison.3. Part 3: Three tasks(a) Design, implement, and test a syntax-directed translator based on Part 2 that automat-ically generates formatted ASCII text and/or HTML/XML from an input Latex sourcefile for basic and advanced text processing.(b) Design and implemented very advanced capabilities for nested blocks, full blown verba-tim, and type and error checking(c) Provide documentation in Latex that is run through both MikTex and your Part 3solution.The three deliverables of Project Part 1 are due as follows:• Due: Wednesday, October 5, 2011 at Start of ClassDesign and implement a lexical analyzer for Latex that recognizes all of its tokens. To assistyou in this process, utilize the file latex.all.txt that enumerates the Latex subset that we willbe utilizing for the course this semester. You are to use the flex generator on the unix boxesand be able to recognize all of the Latex tokens. As output from your lexical analyzer, simplyprint out ALL of the tokens, one per line. Bring a hard copy of your lexical specification(NOT THE GENERATED CODE) to class and submit an electronic copy to me and the TA1Eugene Sanzi ([email protected]) by email by 2:00pm on the due date. The TAmeed to schedule a demonstration of your code with test cases.To assit you in this process, the web site contains the following files:An Overview of Latex: latex.all.txtSample Latex Source Files: latex.in.txt or projp1.texA working Flex spcification: latex.lThe generated Lexical Analyzer: lex.yy.cDocument for latex.l and Output: doc.tex output.txt• Due: Wednesday, October 12, 2011 at Start of ClassDesign a CFG for the project that allows Latex programs (e.g., text to be formatted) to berecognized. This will provide you with important language design experience.Bring a hardcopy of your context free grammmar to class and submit an electronic copy to me and theTA Eugene Sanzi ([email protected]) by 2:00pm on the due date.• Due: Monday, October 17, 2011 at Start of ClassCalculate FIRST and FOLLOW for the ”Common Grammar” that will be posted on the webpage for all of the non-terminals in the grammar. Show your work on FOLLOW so thatwe know you are doing the calculation correctly! The Common Grammar will be posted onthe web site on Thursday, October 12, 2011 by 6:00pm. Bring a hard copy of your FIRSTand FOLLOW calculations to class and submit an electronic copy to me and the TA EugeneSanzi([email protected]) by 2:00pm on the due date.To provide a background for the semester project, a detailed overview of the Latex subset thatyou’ll be implementing along with a sample latex input file has been posted on the class web page.In terms of building and compiling with latex, the process is as follows on a Linux machine:flex latex.lgcc lex.yy.c -lfla.out < doc.texUse control C to exitTo get you started on the second deliverable, a partial latex context-free gramms is providedbelow. One other extension to Latex is the addition of the ”document” keyword. The documentkeyword is used with begin to delimit the start and end of the Latex document. This fact isillustrated in the grammar segment. In the grammar, double quoted entries (” ... ”) representterminals or tokens, while all other entries are non-terminals.latex_statement ---> start_doc main_body end_docstart_doc ---> "\" "begin" "{" "document" "}"end_doc ---> "\" "end" "{" "document" "}"main_body ---> main_body main_option| main_optionmain_option ---> text_option| latex_optionstext_option ---> text_option "word"| "word"latex_options ---> "\" backs_options| "{" curlyb_optionsbacks_options ---> begin_end_opts| section_options| etc... YOU NEED TO COMPLETE THIS!!begin_end_opts ---> begin_options begin_block end_optionsbegin_options ---> "begin" "{" beg_end_cmds "}" table_optionsend_options ---> "end" "{" beg_end_cmds "}"begin_block ---> WHAT ARE THE POSSIBILITIES???begin_end_cmds ---> "center" | "verbatim" | etc...table_options ---> "[" position "]"| epsilonposition ---> "h" | "t" | "b"section_options ---> "section" "{" text_option "}"| "subsection" "{" text_option "}"ETC... TO BE COMPLETED BY


View Full Document

UConn CSE 4100 - Semester Project

Download Semester Project
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Semester Project and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Semester Project 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?