Docsity

CSE4100 Semester Project Overview for Fall 2017 - Latex Subset Development, Slides of Programming Languages

Toggle sidebar
bg1
Semester Project Overview and Part I – CSE4100 – Fall 2017
Part I Due Dates: 11:59 pm October 4, 11, and 16, 2017
The project for the Fall 2017 Semester will focus on the design and implementation of a Latex
subset for text processing. I recommend that you experiment and learn about Latex using the
MikTex http://miktex.org/ or TeXworkds https://www.tug.org/texworks/ software package.
The semester project will be subdivided into three parts:
Part I: Three tasks on Lexical Analysis and Grammars
1. Design and implement a lexical analyzer using the flex generator on the Linux boxes that is
able to identify all lexical tokens for the latex subset.
2. Design and develop a context free grammar (CFG) for a subset of Latex.
3. Calculate FIRST and FOLLOW for a grammar provided after deliverable Part Ib
Part II: Two tasks on Grammar Analysis and Development
1. Analyze a provided context free grammar in Bison that has a number of shift-reduce and
reduce-reduce errors and rewrite the grammar into a form that removes these errors.
2. Design, implement, and test the common CFG (which we will provide to you after you turn
in Part IIa) using Flex and Bison.
Part III: Three tasks on Syntax Directed Translation
1. Design, implement, and test a syntax-directed translator based on Part II that automatically
generates formatted ASCII text and/or HTML/XML from an input Latex source file for basic
and advanced text processing.
2. Design and implemented very advanced capabilities for nested blocks, full blown verbatim,
and type and error checking
3. Provide documentation in Latex that is run through both MikTex and your Part III solution.
1
pf3

Partial preview of the text

Download CSE4100 Semester Project Overview for Fall 2017 - Latex Subset Development and more Slides Programming Languages in PDF only on Docsity!

Semester Project Overview and Part I – CSE4100 – Fall 2017

Part I Due Dates: 11:59 pm October 4, 11, and 16, 2017

The project for the Fall 2017 Semester will focus on the design and implementation of a Latex

subset for text processing. I recommend that you experiment and learn about Latex using the

MikTex http://miktex.org/ or TeXworkds https://www.tug.org/texworks/ software package.

The semester project will be subdivided into three parts:

Part I: Three tasks on Lexical Analysis and Grammars

1. Design and implement a lexical analyzer using the flex generator on the Linux boxes that is

able to identify all lexical tokens for the latex subset.

2. Design and develop a context free grammar (CFG) for a subset of Latex.

3. Calculate FIRST and FOLLOW for a grammar provided after deliverable Part Ib

Part II: Two tasks on Grammar Analysis and Development

1. Analyze a provided context free grammar in Bison that has a number of shift-reduce and

reduce-reduce errors and rewrite the grammar into a form that removes these errors.

2. Design, implement, and test the common CFG (which we will provide to you after you turn

in Part IIa) using Flex and Bison.

Part III: Three tasks on Syntax Directed Translation

1. Design, implement, and test a syntax-directed translator based on Part II that automatically

generates formatted ASCII text and/or HTML/XML from an input Latex source file for basic

and advanced text processing.

2. Design and implemented very advanced capabilities for nested blocks, full blown verbatim,

and type and error checking

3. Provide documentation in Latex that is run through both MikTex and your Part III solution.

The three tasks/deliverables of Project Part I are due as follows:

1. Due: 11:59pm Wednesday, October 4, 2017

Design and implement a lexical analyzer for Latex that recognizes all of its tokens. To assist

you in this process, utilize the file latex.all.txt that enumerates the Latex subset that we will

be utilizing for the course this semester. You are to use the flex generator on the unix boxes

and be able to recognize all of the Latex tokens. As output from your lexical analyzer, simply

print out ALL of the tokens, one per line. Submit an electronic copy to HuskyCT. The TA

may need to schedule a demonstration of your code with test cases.

To assist you in this process, the web site contains the following files:

An Overview of Latex: latex.all.txt Sample Latex Source Files:A working Flex specification: latex.in.txt or projp1.texlatex.l The generated Lexical Analyzer: lex.yy.c Document for latex.l and Output: doc.tex output.txt

2. Due: 11:59pm Wednesday, October 12, 2017

Design a CFG for the project that allows Latex programs (e.g., text to be formatted) to be

recognized. This will provide you with important language design experience. Submit an

electronic copy to HuskyCT.

3. Due: 11:59pm Monday, October 16, 2017

Calculate FIRST and FOLLOW for the ”Common Grammar” that will be posted on the web

page for all of the non-terminals in the grammar. Show your work on FOLLOW so that we

know you are doing the calculation correctly! The Common Grammar will be posted on the

web site on Thursday, October 12, 2017 by 6:00pm. Submit an electronic copy to HuskyCT.

To provide a background for the semester project, a detailed overview of the Latex subset that

you’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 -lfl a.out < doc.texUse control C to exit