scholarly journals Description Of Context Free Grammars In Json Format For Parser Generators

2020 ◽  
Vol 23 (6) ◽  
pp. 1301-1323
Author(s):  
Oleg Konstantinovich Osipov

Analysis of various presentations for context free grammars provided with parser generators. A new description format of context free grammars is proposed. Given a representation of context free grammar in JSON format. The concept of a new parser generator based on JSON data format of describing context free grammars is presented. Described a parser generation scheme based on that concept.

Author(s):  
Wan Heng Fong ◽  
Aqilahfarhana Abdul Rahman ◽  
Nor Haniza Sarmin ◽  
Sherzod Turaev

Sticker systems and Watson-Crick automata are two modellings of DNA molecules in DNA computing. A sticker system is a computational model which is coded with single and double-stranded DNA molecules; while Watson-Crick automata is the automata counterpart of sticker system which represents the biological properties of DNA. Both of these models use the feature of Watson-Crick complementarity in DNA computing. Previously, the grammar counterpart of the Watson-Crick automata have been introduced, known as Watson-Crick grammars which are classified into three classes: Watson-Crick regular grammars, Watson-Crick linear grammars and Watson-Crick context-free grammars. In this research, a new variant of Watson-Crick grammar called a static Watson-Crick context-free grammar, which is a grammar counterpart of sticker systems that generates the double-stranded strings and uses rule as in context-free grammar, is introduced. The static Watson-Crick context-free grammar differs from a dynamic Watson-Crick context-free grammar in generating double-stranded strings, as well as for regular and linear grammars. The main result of the paper is to determine the generative powers of static Watson-Crick context-free grammars. Besides, the relationship of the families of languages generated by Chomsky grammars, sticker systems and Watson-Crick grammars are presented in terms of their hierarchy.


2008 ◽  
Vol 19 (04) ◽  
pp. 845-857
Author(s):  
BEATRICE PALANO

We define a complexity measure on context-free grammars called end. Roughly speaking, for a context-free grammar G, endG(n) measures the distance of variables from the ends of sentential forms along the derivations of words in L(G) of length n. We prove in a constructive way the regularity of L(G)wheneverendG(n)is constant. Yet, we improve on this by showing that ifL(G)is nonregular thenendG(n) = Ω∞( log n). We establish the optimality of such bound. Finally, we show that, in case of unambiguous context-free grammars, the end lower bound for generating nonregular languages turns out to be linear.


2019 ◽  
Vol 53 (2) ◽  
pp. 125-137
Author(s):  
Juan Triana ◽  
Rodrigo De Castro

In this paper some properties, examples and counterexamples about the formal derivative operator defined with respect to context-free grammars are presented. In addition, we show a connection between the context-free grammar G = { a → abr; b → br+1 } and multifactorial numbers. Some identities involving multifactorial numbers will be obtained by grammatical methods.


1975 ◽  
Vol 4 (43) ◽  
Author(s):  
Grzegorz Rozenberg ◽  
Arto Salomaa

It is shown that every context-sensitive language can be generated by a context-free grammar with graph control over sets of productions. This can be done in two different ways, corresponding to unconditional transfer programmed grammars and programmed grammars with empty failure fields. Also some results concerning ordinary programmed grammars are established.


2014 ◽  
Vol 22 (2) ◽  
pp. 141-154
Author(s):  
Dusan Repel ◽  
Ingo Stengel

Purpose – This research aims to propose an attack that de-obfuscates codes by exploiting the properties of context-free grammars since it is important to understand the strength of obfuscation provided by context-free grammar-based obfuscators. In addition, the possibility of automatically generated transformations is explored. Design/methodology/approach – As part of our empirical investigation, a development environment for obfuscating transformations is built. The tool is used to simulate a context-free obfuscator and to devise ways of reversing such transformations. Furthermore, a theoretical investigation of subset grammars and subset languages is carried out. Findings – It is concluded that context-free grammar-based obfuscators provide limited levels of protection. Nevertheless, their application is appropriate when combined with other obfuscating techniques. Research limitations/implications – The algorithms behave as expected on a limited number of test samples. Further work is required to increase their practicality and to establish their average reliability. Originality/value – This research shows how a frequency analysis attack can threaten the security of code scrambled by context-free grammar-based obfuscators.


2015 ◽  
Vol 14 (4) ◽  
pp. 29-44 ◽  
Author(s):  
Ludmila Fedorchenko ◽  
Sergey Baranov

Abstract Regularization of translational context-free grammar via equivalent transformations is a mandatory step in developing a reliable processor of a formal language defined by this grammar. In the 1970-ies, the multi-component oriented graphs with basic equivalent transformations were proposed to represent a formal grammar of ALGOL-68 in a compiler for IBM/360 compatibles. This paper describes a method of grammar regularization with the help of an algorithm of eliminating the left/right-hand side recursion of nonterminals which ultimately converts a context-free grammar into a regular one. The algorithm is based on special equivalent transformations of the grammar syntactic graph: elimination of recursions and insertion of iterations. When implemented in the system SynGT, it has demonstrated over 25% reduction of the memory size required to store the respective intermediate control tables, compared to the algorithm used in Flex/Bison parsers.


Author(s):  
M. NIVAT ◽  
A. SAOUDI

We investigate the complexity of the recognition of images generated by a class of context-free image grammars. We show that the sequential time complexity of the recognition of an n × n image as generated by a context-free grammar is O(nM(n)), where M(n) is the time to multiply two boolean n × n matrices. The space complexity of this recognition is O(n3). Using a parallel random access machine (i.e. PRAM), the recognition can be done in O( log 2(n)) time with n7 processors or in O(n log 2(n)) time with n6 processors. We also introduce high dimensional context-free grammars and prove that their recognition problem is polylogarithmic.


2004 ◽  
Vol 15 (02) ◽  
pp. 403-415 ◽  
Author(s):  
JACIR L. BORDIM ◽  
OSCAR H. IBARRA ◽  
YASUAKI ITO ◽  
KOJI NAKANO

The main contribution of this paper is an FPGA-based implementation of an instance-specific hardware which accelerates the CKY (Cocke-Kasami- Younger) parsing of context-free grammars. Given a context-free grammar G and a string x, the CKY parsing determines whether G derives x. We developed a hardware generator that creates a Verilog HDL source to perform the CKY parsing for any fixed context-free grammar G. The generated source is embedded in an FPGA using the design software provided by the FPGA vendor. The results show that our instance-specific hardware solution attains an astonishing speed-up factor of up to 3,700 over traditional software solutions.


2012 ◽  
Vol 9 (3) ◽  
pp. 1105-1124 ◽  
Author(s):  
Bostjan Slivnik

A method for resolving LL(k) conflicts using small LR(k) parsers (called embedded left LR(k) parsers) is described. An embedded left LR(k) parser is capable of (a) producing the prefix of the left parse of the input string and (b) stopping not on the end-of-file marker but on any string from the set of lookahead strings fixed at the parser generation time. The conditions regarding the termination of the embedded left LR(k) parser if used within LL(k) (and similar) parsers are defined and examined in-depth. It is proved that an LL(k) parser augmented with a set of embedded left LR(k) parsers can parse any deterministic context-free grammar in the same asymptotic time as LR(k) parser. As the embedded left LR(k) parser produces the prefix of the left parse, the LL(k) parser augmented with embedded left LR(k) parsers still produces the left parse and the compiler writer does not need to bother with different parsing strategies during the compiler implementation.


2006 ◽  
Vol 13 (9) ◽  
Author(s):  
Claus Brabrand ◽  
Robert Giegerich ◽  
Anders Møller

<p>It has been known since 1962 that the ambiguity problem for context-free grammars is undecidable. Ambiguity in context-free grammars is a recurring problem in language design and parser generation, as well as in applications where grammars are used as models of real-world physical structures. However, the fact that the problem is undecidable does not mean that there are no useful <em>approximations</em> to the problem.<br /> <br />We observe that there is a simple linguistic characterization of the grammar ambiguity problem, and we show how to exploit this to conservatively approximate the problem based on local regular approximations and grammar unfoldings. As an application, we consider grammars that occur in RNA analysis in bioinformatics, and we demonstrate that our static analysis of context-free grammars is sufficiently precise and efficient to be practically useful.</p><p> </p><p>Full text: <a href="http://dx.doi.org/10.1016/j.scico.2009.11.002" target="_self">http://dx.doi.org/10.1016/j.scico.2009.11.002</a></p>


Sign in / Sign up

Export Citation Format

Share Document