Changeset 3807 for applications/trunk


Ignore:
Timestamp:
Jun 12, 2008, 7:58:42 AM (12 years ago)
Author:
orlov
Message:
  • Small fixes in the grammar.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/trunk/LFC/lfcg.grammar

    r3806 r3807  
    11/* $Id$
    22 *
    3  * This is LL(1) grammar for grammars used in LFC based on the "Introduction to LFC Programming
    4  * Language" (January 25, 2008) by Zhen Lixiao
     3 * This is LL(1) grammar for grammars used in LFC based on the "Introduction to
     4 * LFC Programming Language" (January 25, 2008) by Zhen Lixiao
    55 */
    66
    77%token LANG RANG
    88%token LBRACKET RBRACKET
    9 %token TO VBAR
     9%token TO VBAR TILDA
    1010%token BLANK
    11 %token IDENTIFIER
     11%token IDENTIFIER STRING
    1212
    1313%%
    1414
    1515grammar : /*empty*/
    16         | production grammar
    17         | BLANK grammar
    18         ;
     16        | production grammar_rest
     17        ;
     18
     19grammar_rest : /*empty*/
     20             | BLANK grammar
     21             ;
    1922
    2023production : ordinary_production
    21            | non-token_production
     24           | non_token_production
    2225           ;
    2326
    2427ordinary_production : LANG IDENTIFIER RANG TO terms ;
    2528
    26 non-token_production : LBRACKET IDENTIFIER RBRACKET TO terms ;
     29non_token_production : LBRACKET IDENTIFIER RBRACKET TO terms ;
    2730
    2831terms : term terms_rest ;
    2932
    3033terms_rest : /*empty*/
    31            | VBAR term terms_rest
     34           | VBAR terms
    3235           ;
    3336
     
    3538
    3639item_rest : /*empty*/
    37           | item item_rest
     40          | term
    3841          ;
    3942
Note: See TracChangeset for help on using the changeset viewer.