Fixing list copy and grammar sentence generation

This commit is contained in:
IlushaShurupov 2023-08-11 18:49:45 +03:00
parent 43fe34dcbf
commit 0a886bd8a8
5 changed files with 38 additions and 13 deletions

View file

@ -5,8 +5,16 @@ This grammar wil produce text in the form: TODO
*/
/* This is the starting production of the grammar */
/* Simple Example
Start A
A : [ ID ] | &;
*/
/* Production rule */
A : [ ID ] [ IS ] [ IDs ];
/* Lists Example */
Start List
List : List Stm | Stm;
Stm : StmBody [ END ];
StmBody: [ Stm1 ] | [ Stm2 ] | [ Stm3 ];