## 2 Conceptual Framework
### Syntactic Pattern Recognition--The Core Concept  
Context-Free Grammars  
CFGs are mathematical models used in formal language theory and computer science for defining and generating formal languages. A CFG consists of a set of production rules that specify how strings of symbols can be generated from a given starting symbol, known as the axiom or start symbol. The production rules define how symbols can be transformed into other symbols, including themselves, until a string that belongs to the language defined by the grammar is obtained.  
In a CFG, symbols can be either terminals or non-terminals. Terminals are the actual symbols that appear in the strings of the language, while non-terminals are symbols used to generate the terminals through the application of the production rules. The production rules in a CFG must satisfy certain restrictions, such as being context-free, meaning that the rule can be applied regardless of the context in which the non-terminal appears. This is in contrast to context-sensitive grammars, where the rule for a non-terminal may depend on the context in which it appears.  
Consequently, the definition of a CFG is a set of four components: \(\langle NT,T,R,S\rangle\). The start symbol \(S\) (which is also known as the root of the grammar) is part of the set of non-terminal symbols \(NT\). The set \(T\) contains all terminal symbols, while \(NT\) includes all non-terminal symbols. The set \(R\) holds all the production rules. The production rules are written in the form \(D\rightarrow\gamma\), where \(D\) is a non-terminal symbol from \(NT\), and \(\gamma\) is a string made up of symbols from \(T\) and/or \(NT\).  
The proposed methodology for predicting pseudoknots in RNA structures is founded on recognizing syntactic patterns. This methodology requires the formulation of a language using a set of syntax regulations that can generate strings that are part of that language [7]. These syntax rules form a grammar that specifies how specific sequences of symbols that make up the defined language can be generated [7]. [PERSON]'s hierarchy [8] divides all grammars into four categories, with context-free grammars (CFGs) being one of them. CFG is often used for programming language implementation and recognition of human languages [9].  
CFGs are widely used in computer science for tasks such as parsing and compiling computer programs, recognizing and generating human language, and for modeling RNA structures, among others. The concept of a CFG and its production rules can be extended to more powerful models, such as context-sensitive grammars and unrestricted grammars, allowing for the definition and generation of more complex languages.  
Many parsing algorithms have been suggested for CFG grammars because of their significant expressive capabilities. Two widely used parsing algorithms are the CYK parser [10] and the Earley parser [11]. There are also several extensions [12; 13; 14] and parallel versions [15; 16] of these two algorithms in the literature. The proposed implementation chose Earley's parser owing to its competence in handling ambiguous grammars and effectiveness. The implementation relies on the Yet Another Earley Parser (YAEP) [17], a proficient Earley parser able to parse ambiguous grammars with efficiency.