| Refresh | Home EGTry.com

compiler terminology



lexemes

a sequence of characters that form tokens.


context-free grammar

a context-free grammar can be expressed by BNF production.
{A^n}: {A, AA, AAA, AAAA ... } is a regular expression
{A^nB^n}: {AB, AABB, AAABBB ...} is a context-free grammar, but not a regular expression
{A^n B^n C^n}, {ABC AABBCC AAABBBCC,...} is non-context-free grammar, not a regular expression


Kleene closure

[ab]* is the Kleense closure of the set {a, b}.
{"", "a", "b", "ab", "ba", "aaa", "aab", "aba", "abb", "baa", "bab", "bba", "bbb", ....}