Jump to content

Bottom-up parsing

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Tomdee (talk | contribs) at 14:27, 25 May 2004 (First version - needs a lot more work.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Over view of bottom up parsing

Four classes of language commonly used: LR(0) - No lookahead symbol

SLR(1) - Simple with one lookahead symbol

LALR(1) - Lookahead bottom up, not as powerful as full LR(1) but more simple to implement. YACC uses this language

LR(1) - Most general language, but most complex to implement.

Hand coding is very complex for any of these language classes so the use of parser generators is highly recommended.

Parser performs one of two actions (beside accept). These are "Shift" and "Reduce".