class BowlingScorer::Parser
- BowlingScorer::Parser
- Reference
- Object
Overview
LL(K) Parser where our K is 3. Our lookahead is three because of a strike is calculated differently when you have three in a row. Our parser is reading tokens off our lexer and building a list of frames. The resulted list repesents a complete game with each frame having the correct score for that frame.
Defined in:
bowling-scorer/parser.crConstructors
Instance Method Summary
- #current_frame : Frame
- #current_frame=(current_frame : Frame)
- #frame : Int32
- #frame=(frame : Int32)
- #frames : Array(Frame)
- #index : Int32
- #index=(index : Int32)
- #lexer : Lexer
- #lookahead : Int32
-
#parse : Void
Public API
- #score : Int32
- #score=(score : Int32)
- #tokens : Array(Token)