Modify the context-free grammar for variables given in class to allow the
following more general class of identifiers:
- Identifiers may contain uppercase letters, lowercase letters, digits,
and the underscore symbol.
- Every identifier must contain at least one letter, either uppercase
or lowercase.
- Every identifier must contain at least one uppercase letter or at least
one digit.
- Neither the first nor the last character in an identifier may be an
underscore, nor may there be two consecutive underscores.
Legal examples: Cost_1, cost_1, Cost, C_o_s_t, 1_c
Illegal examples:
- cost (no uppercase letter or digit)
- _Cost (begins with an underscore)
- 1234 (no letters)
- 12__A (two consecutive underscores)