Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what are these arrow operators in context free grammar?

I'm studying context free grammar and I'm curious what the arrow with the star and the arrow without the star mean in parts f and g where:

  • f is false.
  • g is true.

enter image description here

like image 382
jfisk Avatar asked Oct 18 '11 23:10

jfisk


People also ask

What is symbol in context-free grammar?

In every context-free grammar, one of the non-terminal symbols is designated as the start symbol of the grammar. The start symbol is often, though not always, denoted by S. When the grammar is used to generate strings in a language, the idea is to start with a string consisting of nothing but the start symbol.

What are the four 4 components of context-free grammar?

A context free grammar has 4 components: – A set of tokens, known as terminal symbols. – A set of nonterminals. nonterminal, called the left side of the production, an arrow, and a sequence of tokens and/or nonterminals, called the right side of the production.

What are CFGs used for?

Context-free grammars (CFGs) are used to describe context-free languages. A context-free grammar is a set of recursive rules used to generate patterns of strings. A context-free grammar can describe all regular languages and more, but they cannot describe all possible languages.

What does Star mean in CFG?

"x ⇒ y" means that y can be derived from x in exactly one application of some production of the grammar. Putting an asterisk over the ⇒ means that y is derived from x via zero or more (but finitely many!) applications of some sequence of productions. Follow this answer to receive notifications.


2 Answers

"x ⇒ y" means that y can be derived from x in exactly one application of some production of the grammar. Putting an asterisk over the ⇒ means that y is derived from x via zero or more (but finitely many!) applications of some sequence of productions.

like image 70
jwodder Avatar answered Oct 06 '22 08:10

jwodder


See http://en.wikipedia.org/wiki/Context-free_grammar#Repetitive_rule_application for an explanation.

That is to say, if u star-arrow v, there is some series of applications of rules that goes from u to v.

like image 36
Ethereal Avatar answered Oct 06 '22 08:10

Ethereal