Journal of Information Processing
Online ISSN : 1882-6652
ISSN-L : 1882-6652
 
Derivatives of Context-free Grammars with Lookahead
Takayuki MiyazakiYasuhiko Minamide
Author information
JOURNAL FREE ACCESS

2023 Volume 31 Pages 421-431

Details
Abstract

Context-free grammars with lookahead (CFGLAs) are context-free grammars with positive and negative lookahead. In this paper, we develop a recognition algorithm for CFGLA by combining derivatives of context-free grammars and derivatives of regular expressions with lookahead. The original semantics of CFGLA has some problems, and the recognition algorithm does not run in polynomial time. We introduce better semantics with the least fixed point of pairs of lower and upper bounds. Under the new semantics, the recognition algorithm runs in O(n3 |G|) time and O(n2 |G|) space for an input string of the length n and a given CFGLA G.

Content from these authors
© 2023 by the Information Processing Society of Japan
Previous article Next article
feedback
Top