Changeset 4080 for applications/trunk


Ignore:
Timestamp:
Jul 16, 2009, 1:04:46 PM (11 years ago)
Author:
orlov
Message:
  • Names are represented as compound symbols, not (terms).
Location:
applications/trunk/LFC
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • applications/trunk/LFC/lfc.ast

    r3893 r4080  
    4747t.var ::= (VAR t.name)
    4848
    49 t.name ::= ([characters])
     49t.name ::= "compound_symbol"
  • applications/trunk/LFC/parser/GrammarParser.rf

    r3893 r4080  
    77$public $func ParseGrammarFile e.fname = e.grammar;
    88ParseGrammarFile e.fname =
    9   <ParseGrammar <File_Open "samples.g">>;
     9  <ParseGrammar <File_Open e.fname>>;
    1010
    1111$func ParseGrammar stream = e.grammar;
     
    3636CheckIdentifier e.ident (e.production) =
    3737  {
    38     <ScanIdentifier e.ident 0 0> : e () s s = (TYPE (e.ident));
     38    <ScanIdentifier e.ident 0 0> : e () s s = (TYPE <ToWord e.ident>);
    3939    $error "Invalid nonterminal name in the left part of the production " e.production;
    4040  };
  • applications/trunk/LFC/parser/Parser.rf

    r3895 r4080  
    1 $use Access Apply StdIO Stream;
     1$use Access Apply Convert StdIO Stream;
    22$use Lexer;
    33
     
    240240$func Identifier e.tokens = e.ast (e.tokens);
    241241Identifier {
    242   (IDENTIFIER e.ident t.pos) e.tokens = (e.ident) (e.tokens);
     242  (IDENTIFIER e.ident t.pos) e.tokens = <ToWord e.ident> (e.tokens);
    243243  e.tokens = <Error (e.tokens) "expected an identifier">;
    244244};
Note: See TracChangeset for help on using the changeset viewer.