parsing

parsing - COP4020 Programming Languages Parsing Prof. Xin...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: COP4020 Programming Languages Parsing Prof. Xin Yuan COP4020 Spring 2011 2 02/20/12 Overview Top-down and bottom-up parsing Recursive descent parsing Table driven LL(1) parsing Parsing: The process to determine whether the start symbol can derive the program. If successful, the program is a valid program. If failed, the program is invalid. Two approaches in general. Expanding from the start symbol to the whole program (top down) Reduction from the whole program to start symbol (bottom up). Parsing methods: universal: There exists algorithms that can parse any context free grammar. These algorithms are too inefficient to be used anywhere. What is considered efficient? Scan the program (from left to right) once. Top-down parsing build the parse tree from root to leave (using leftmost derivation, why?). Recursive descent, and LL parser L left to right, L left most derivation Bottom-up parsing build the parse tree from leaves to root.build the parse tree from leaves to root....
View Full Document

This note was uploaded on 02/20/2012 for the course COP 4020 taught by Professor Engelen during the Spring '11 term at FSU.

Page1 / 11

parsing - COP4020 Programming Languages Parsing Prof. Xin...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online