Left-to-right parsing (LR)
In this chapter we consider another approach to parsing, called an LR(1)-parsing algorithm, as well as some simplified versions of it. We start by describing a general scheme of left-to-right parsing (section 16.1). Then we consider a class of grammars for which this scheme can be implemented easily (LR(0)-grammars, section 16.2). Some extensions of this class are discussed in sections 16.3 (SLR(1)-grammars) and 16.4 (LR(1)- and LALR(1)-grammars).We conclude the chapter with some generalremarks about parsing (section 16.5).
KeywordsProduction Rule Input String Input Symbol Preceding Problem Empty String
Unable to display preview. Download preview PDF.