LR(k) sparse-parsers and their optimisation

A method of syntactic analysis is developed which is believed to surpass all known competitors in all major respects. I The method is based upon that associated with the LR(k) grammars but is faster because it bypasses all reduction steps concerned with 'chain' productions. These are freel...

Full description

Bibliographic Details
Main Author: Rushby, John Martin
Published: University of Newcastle Upon Tyne 1977
Subjects:
410
Online Access:http://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.471188
id ndltd-bl.uk-oai-ethos.bl.uk-471188
record_format oai_dc
spelling ndltd-bl.uk-oai-ethos.bl.uk-4711882015-03-19T03:42:30ZLR(k) sparse-parsers and their optimisationRushby, John Martin1977A method of syntactic analysis is developed which is believed to surpass all known competitors in all major respects. I The method is based upon that associated with the LR(k) grammars but is faster because it bypasses all reduction steps concerned with 'chain' productions. These are freely selected productions which are considered semantically irrelevant and whose right parts consist of just a single symbol. The parses produced by the method are 'sparse' in that they contain no references to chain productions - they are termed 'chain-free' parses. The CFLR(k) grammars are introduced as the largest class which can be -Chain-F-ree parsed from -Le-ft to Right while looking ~ symbols ahead of the current point of the parse. The properties of these grammars are examined in detail and their relationship to the conventional LR(k) grammars is explored. Techniques are presented for testing grammars for the CFLR(k) property and for constructing chain-free parsers for those grammars possessing the property. Methods are also presented for. converting ordinary LR(k) parsers into chain-free parsers. CFLR(k) parsers are more widely applicable than their LR(k) counterparts, are faster 'and provide the same excellent detection of syntactic errors. Unfortunately they also tend to be rather larger. A 'simple optimization is presented which completely'overcomes this single disadvantage without sacrificing any of the advantages of the method. These theoretical techniques are adapted to provide truly practical chain-free parsers based on the conventional SLR and,LALR parsing methods. Detailed consideration is given to use of 'default reductions' and related techniques for achd.evfng compact representations of these parsers. The resulting chain-free parsers are not only faster than their ordinary counterparts, but probably smaller too. We believe their advantages are such that they should substantially replace other parsing methods currently used in programming language compilers.410University of Newcastle Upon Tynehttp://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.471188http://hdl.handle.net/10443/1962Electronic Thesis or Dissertation
collection NDLTD
sources NDLTD
topic 410
spellingShingle 410
Rushby, John Martin
LR(k) sparse-parsers and their optimisation
description A method of syntactic analysis is developed which is believed to surpass all known competitors in all major respects. I The method is based upon that associated with the LR(k) grammars but is faster because it bypasses all reduction steps concerned with 'chain' productions. These are freely selected productions which are considered semantically irrelevant and whose right parts consist of just a single symbol. The parses produced by the method are 'sparse' in that they contain no references to chain productions - they are termed 'chain-free' parses. The CFLR(k) grammars are introduced as the largest class which can be -Chain-F-ree parsed from -Le-ft to Right while looking ~ symbols ahead of the current point of the parse. The properties of these grammars are examined in detail and their relationship to the conventional LR(k) grammars is explored. Techniques are presented for testing grammars for the CFLR(k) property and for constructing chain-free parsers for those grammars possessing the property. Methods are also presented for. converting ordinary LR(k) parsers into chain-free parsers. CFLR(k) parsers are more widely applicable than their LR(k) counterparts, are faster 'and provide the same excellent detection of syntactic errors. Unfortunately they also tend to be rather larger. A 'simple optimization is presented which completely'overcomes this single disadvantage without sacrificing any of the advantages of the method. These theoretical techniques are adapted to provide truly practical chain-free parsers based on the conventional SLR and,LALR parsing methods. Detailed consideration is given to use of 'default reductions' and related techniques for achd.evfng compact representations of these parsers. The resulting chain-free parsers are not only faster than their ordinary counterparts, but probably smaller too. We believe their advantages are such that they should substantially replace other parsing methods currently used in programming language compilers.
author Rushby, John Martin
author_facet Rushby, John Martin
author_sort Rushby, John Martin
title LR(k) sparse-parsers and their optimisation
title_short LR(k) sparse-parsers and their optimisation
title_full LR(k) sparse-parsers and their optimisation
title_fullStr LR(k) sparse-parsers and their optimisation
title_full_unstemmed LR(k) sparse-parsers and their optimisation
title_sort lr(k) sparse-parsers and their optimisation
publisher University of Newcastle Upon Tyne
publishDate 1977
url http://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.471188
work_keys_str_mv AT rushbyjohnmartin lrksparseparsersandtheiroptimisation
_version_ 1716734276763910144