Lab 1: Introducing Scanning & Parsing by Creating One Validation Tool
Lab 1: Introducing Scanning & Parsing by Creating One Validation Tool
Compiler Construction
Spring 2011
This lab is design to introduce you to the fundamentals of compiler construction, focusing on scanning and parsing. The lab is to be done individually. Description Using the JavaScript scanner and parser framework begun in the checker web page (see class Schedule page), implement one validation tool. The tool will validate a mathematical expression, as specified in the grammar below. To accomplish this, you will save the checker web page and modify the code in it. What to hand in Email to me your one HTML file that contain the working validator. Mathematical Expression Validator Grammar: exp addop term mulop factor number integer term addop exp | term + | factor mulop term | factor * | / ( exp ) | number -integer | integer [0-9]integer | [0-9]
Grading criteria (50 points max for working validator) Points available: 40 points if it handles a variety of input and correctly analyzes input and reports either accept or reject 5 points if it provides some reason or justification for the decision to reject 5 points if it provides precision, such as line number or character number in the input along with the reject justification
Lab 1