# Context-Free Grammars

**URL:** <https://es.discourse.group/t/context-free-grammars/1904>\
**Category:** I have questions\
**Created:** [January 22, 2024, 3:46pm UTC](https://es.discourse.group/t/context-free-grammars/1904 "2024-01-22T15:46:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kavi](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/kavi/32/1972_2.png) [@kavi](https://es.discourse.group/u/kavi)\
**Post date:** [January 22, 2024, 3:46pm UTC](https://es.discourse.group/t/context-free-grammars/1904/1 "2024-01-22T15:46:25Z")

</div>

![cfg](https://global.discourse-cdn.com/free1/uploads/es/original/2X/1/178334058109e8a613bdca7867f6f46ec7355b27.png)  
As of now somewhat i am able to understand context free grammar first and second paragraph.  
However an example will be more helpful.  
My most needed help paragraph especally this sentence:  
An example will be helpful -\>Starting from a sentence consisting of a single distinguished nonterminal. My understanding in js increasing gradually and with your help i can further increase the understanding. Thank you.

---

<div class="post-metadata">

**Author:** ![jmdyck](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/jmdyck/32/796_2.png) [@jmdyck](https://es.discourse.group/u/jmdyck)\
**Post date:** [January 22, 2024, 10:05pm UTC](https://es.discourse.group/t/context-free-grammars/1904/2 "2024-01-22T22:05:58Z")

</div>

For the "Starting from" sentence, a common example is where the _goal symbol_ is _Script_ and the resulting _language_ is the (infinite) set of all JS scripts. The 'replacement' process would start with [the production for _Script_](https://tc39.es/ecma262/#prod-Script).

Note that the ECMAScript spec is not a good place to learn about context-free grammars. It's also not a good place to learn JS from scratch. But there's no end of resources on the web for learning both of these.

---

<div class="post-metadata">

**Author:** ![kavi](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/kavi/32/1972_2.png) [@kavi](https://es.discourse.group/u/kavi)\
**Post date:** [January 23, 2024, 2:41am UTC](https://es.discourse.group/t/context-free-grammars/1904/3 "2024-01-23T02:41:53Z")

</div>

Thankyou for answer (I will check it out) and opinion 👍.
