Moderator: Automated Software Engineering
can anyone please briefly explain the CFG Syntax of JavaMOP (29 in the version with animations), I'm not sure how to interpret that . Thanks in advance.
you havecfg: S ‐> create N U next, N ‐> next N | epsilon, U ‐> update U | update
- "N", "U" and "S" as non-terminal characters
- "create", "next" and "update" as terminals
- "S ‐> create N U next", "N ‐> next N | epsilon", "U ‐> update U | update" as production rules
- S as a start symbol
With "N -> next N | epsilon" you either append another next to the sentence (producing "next N" with still a non-terminal), or you eliminate an N ("epsilon" is the empty word, so N gets transformed into "nothing"). So this means you can have zero or more "next"s in your sentence, directly after the "create".
With the rule "U -> update U | update" you produce at least one "update", so in the end you can create exactly the same sentences as the extended regular expression (ere) from slide 28:
HTH, too.create next* update update* next