• Title/Summary/Keyword: LR parsing

Search Result 23, Processing Time 0.02 seconds

Application of Single-State Parsing Automata to LR Grammars (LR 문법에 대한 단일상태파싱오토마톤의 적용)

  • Lee, Gyung-Ok
    • Journal of KIISE
    • /
    • v.43 no.10
    • /
    • pp.1079-1084
    • /
    • 2016
  • Single-state parsing automata have a characteristic such that the decision of an action depends only on the current state but not on the parsing history. The memory space and the parsing time of single-state parsing automata are less than the memory space and the parsing time of LR automata. However, the applicable grammar class of single-state parsing automata is less than that of LR automata. This paper provides extended single-state parsing automata, which are applicable to LR grammars. In the prior work, the special state, referred to as the cyclic state was not treated in the construction of single-state parsing automata, and hence, the applicable grammar class was less than LR grammars. The paper solves the problem of cyclic states by processing dynamic information depending on an input string. The proposed method expands the application of grammar class of single-state parsing automata to LR grammars.

An Efficient Incremental LR Parsing Algorithm (효율적인 점진적 LR 파성 알고리즘)

  • 안희학;유채우;송후봉
    • Journal of the Korean Institute of Telematics and Electronics B
    • /
    • v.31B no.4
    • /
    • pp.9-17
    • /
    • 1994
  • The incremental parsing techniques are essential part of language-based environment which allow incremental construction of programs, as reparsing of modified part of the program alone enhances the system performance. A number of methods and algorithms have been proposed for incremental parsing and for the construction of incremental parsers. The purpose of this paper is to review the earlier incremental parsing algorithms which are too expensive in both time and space, and to present an efficient incremental LR parsing algorithm which is more efficient than the previous ones. In this paper, we generate automatically an extended LR parsing tables which allow the nonterminal symbols as well as terminal symbols for the input, and apply them to our efficient incremental LR parsing algorithm. Using these extended LR parsing tables. we suggest several methods to reduce its memory spaces and parsing steps as well. The algorithms described here were implemented in C language and YACC on a SUN UNIX OS, and were tested with several grammars and strings.

  • PDF

Extended LR Methods for Efficient Parsing with Feature-based Grammars

  • Le, Kang-Hyuk
    • Korean Journal of Cognitive Science
    • /
    • v.15 no.1
    • /
    • pp.25-33
    • /
    • 2004
  • This paper discusses two problems with LR parsing with regard to constructing parsing tables with feature-based grammars. First, we show that traditional LR parsing methods suffer from nontermination and nondeterminism problems when they are applied to feature-based grammars. We then present an LR method for feature-based grammars that avoids both nontermination and nondetermisim by making use of partial information of a feature structure. Second, we describe the problem of adapting LR parsing to feature-based grammars with schematic rules (i.e., rules that do not contain enough information to construct parsing tables). To remedy this problem, we propose a rule inference algorithm which instantiates underspecified rules into more specified ones containing enough information.

  • PDF

A LR Parsing Algorithm for Tree Adjoining Grammar (트리 접합 문법의 LR파싱 알고리즘)

  • 한성국
    • Korean Journal of Cognitive Science
    • /
    • v.6 no.3
    • /
    • pp.41-63
    • /
    • 1995
  • We present a LR,bottom-up parsing algorithms for TAG. We will introduce the adjoining rules system to handle the formal properties of TAG and to describe the parsing process more effectively. We will consider the context-free behavior of TAG at the adjoining instant. Then we will present the LR bottom up parsing algorithm for TAG by using this property. The basic idea behind a LR bottom up parsing algorithm can be applied to parsing TAG with other conventional algorithms.

  • PDF

On Design and Implementation of Incremental LR Parsing Algorithm Using Changed Threed Tree (변화된 스레드 트리를 이용한 점진적 LR 파싱 알고리즘 구현 및 설계)

  • Lee, Dae-Sik
    • Convergence Security Journal
    • /
    • v.5 no.4
    • /
    • pp.19-25
    • /
    • 2005
  • Threaded Tree is the data structure that can express parse stack as well as parse tree with LR parsing table. $Larchev\^{e}que$ makes Threaded Tree and Incremental Parsing with stack. This paper suggests the algorithm consisting of changed threaded tree without stack in order to reduce reparsing node and parsing speed. Also, it suggests incremental parsing algorithm to get rid of the reparsing process in node.

  • PDF

Constructing a of Single State Parsing Automaton (단일 상태 파싱 오토마톤의 생성)

  • Lee, Gyung-Ok
    • Journal of KIISE:Software and Applications
    • /
    • v.35 no.11
    • /
    • pp.701-704
    • /
    • 2008
  • A general automaton allows multiple input transitions, so a special treatment is required when the history of transitions is needed. An LR automaton keeps the past transitions in the stack to use them during parsing. On the other hand, when each state in an automaton contains in itself the past transition history, the trace overhead of past transitions is unnecessary. The paper suggests a single state parsing automaton that does not depend on the past transitions. The applicable grammar class is less than LR grammars, but each state in a new automaton contains the past information, so the tracing of the history is not required compared to LR automaton.

Generalized LR Parser with Conditional Action Model(CAM) using Surface Phrasal Types (표층 구문 타입을 사용한 조건부 연산 모델의 일반화 LR 파서)

  • 곽용재;박소영;황영숙;정후중;이상주;임해창
    • Journal of KIISE:Software and Applications
    • /
    • v.30 no.1_2
    • /
    • pp.81-92
    • /
    • 2003
  • Generalized LR parsing is one of the enhanced LR parsing methods so that it overcome the limit of one-way linear stack of the traditional LR parser using graph-structured stack, and it has been playing an important role of a firm starting point to generate other variations for NL parsing equipped with various mechanisms. In this paper, we propose a conditional Action Model that can solve the problems of conventional probabilistic GLR methods. Previous probabilistic GLR parsers have used relatively limited contextual information for disambiguation due to the high complexity of internal GLR stack. Our proposed model uses Surface Phrasal Types representing the structural characteristics of the parse for its additional contextual information, so that more specified structural preferences can be reflected into the parser. Experimental results show that our GLR parser with the proposed Conditional Action Model outperforms the previous methods by about 6-7% without any lexical information, and our model can utilize the rich stack information for syntactic disambiguation of probabilistic LR parser.

Grammar Classes Generating Single State Parsing Automata (단일 상태 파싱 오토마톤을 생성하는 문법 클래스들)

  • Lee, Gyung-Ok
    • Journal of KIISE:Software and Applications
    • /
    • v.41 no.7
    • /
    • pp.518-522
    • /
    • 2014
  • A single state parsing automaton has the characteristics of the decision of actions which do not depend on the history of the parsing paths but on the current state. The single state parsing automaton hence has the advantage of the reduced parsing time and a small memory requirement compared to those of the conventional LR automaton. However, currently, the grammar classes generating single state parsing automata have not been known. This paper deals with the grammar classes generating single state parsing automata; in addition, this paper gives the generating method of single state parsing automata of the grammar classes.

Improvement of LR Parser using Reduction Goals (리덕션 골을 이용한 LR 파서의 개선)

  • Son, Yun-Sik;Oh, Se-Man
    • Journal of Korea Multimedia Society
    • /
    • v.11 no.5
    • /
    • pp.703-709
    • /
    • 2008
  • The methodology of the compiler construction improved by well-defined parsing techniques and developments of automatic generation tools. Through them, a variety of compilers for the special applications can be developed effectively: particularly, the compiler for embedded/mobile devices. Also, as contents industry is proliferating recently, the necessity of developing a compiler which is suitable for contents system is highly increasing. These various demands can be resolved by modular techniques and automatic construction of compilers. But, optimization of compiler itself as development tools uses heuristic methods and it needs higher cost. In this paper, we suggest the parsing method which can decrease unnecessary reduce actions by analyzing the characteristics of LR parser. The suggested parsing technique uses lookahead/ states, reachable reduction goals information in parsing process and enhances the parsing efficiency by changing continuous reduce actions to one. Actually, we applied it to the front-end of ANSI C compiler and proved the parsing performance in terms of the number of reduce actions.

  • PDF