/*******************************************************************************
    prefal: Self-parser of Refal-5.
    The parser takes Refal-5 source codes from a file, and returns a refal expression
    encoding the input program.
    Comments are not removed and may be encountered as (Comment e.chars) 
    everywhere inside the parser output.
*******************************************************************************/
* Input syntax: <prefal e.fname '.ref'>
*
* Output syntax:
===================================================================================
         e.module ::= t.interface e.funcs 
         e.funcs ::= t.fbody+
         t.fbody ::= (t.ftype t.fname t.sentence+)
            t.ftype ::= (s.ftype e.comments)
            s.ftype ::= ENTRY | LOCAL
            t.fname ::= (s.fname e.comments)
            t.sentence ::= ((e.left-side) '=' (e.right-side)) | (e.left-side e.end)
            e.left-side ::= e.patt t.condition*
            t.condition ::= (Condition t.expr (Pattern e.patt))
            e.right-side ::= e.expr
            e.end ::= (Condition t.expr (Block t.sentence+))
                  t.expr ::= (Expression e.expr)
                  e.patt ::= t.term e.patt | (Bracket e.patt) e.patt | e.empty
                  e.expr ::= t.term e.expr | (Bracket e.expr) e.expr | t.fcall e.expr | e.empty
                  t.term ::= t.variable | t.number | t.symbol
                  t.symbol ::= t.word | s.char
                  t.word ::= (Word WORD_NAME)
                  s.char ::= CHARACTER
                  t.number ::= (MacroDigit MACRO_DIGIT)
                  t.variable ::= (Variable s.vtype VARIABLE_NAME)
                       s.vtype ::= 's' | 't' | 'e'
                  t.fcall ::= (Call s.fname e.expr)
                       s.fname ::= FUNCTION_NAME

         t.interface ::= t.extern
            t.extern ::= (EXTERN s.fname*)
=================================================================================
*


