Changeset 3792


Ignore:
Timestamp:
May 30, 2008, 9:50:49 PM (13 years ago)
Author:
orlov
Message:
  • Added $public in cmd-line parser.
Location:
to-imperative/trunk/compiler/refal/org/refal/plus/compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/compiler/refal/org/refal/plus/compiler/rfp_lex.rf

    r3589 r3792  
    129129    'native' = NATIVE;
    130130    'module' = MODULE;
     131    'public' = PUBLIC;
    131132    'string' = STRING;
    132133    'table' = TABLE;
  • to-imperative/trunk/compiler/refal/org/refal/plus/compiler/rfp_parse.rf

    r3696 r3792  
    108108  VECTOR = "$vector";
    109109  STRING = "$string";
     110  PUBLIC = "$public";
    110111  FUNC = "$func";
    111112  "FUNC?" = "$func?";
     
    225226{
    226227  <Expect_Token
    227     BOX TABLE VECTOR STRING CHANNEL CONST WORD QWORD FUNC "FUNC?" TFUNC EXTERN MODULE USE TRACE TRACEALL EOF EOFS BOF NATIVE
     228    BOX TABLE VECTOR STRING CHANNEL CONST WORD QWORD PUBLIC FUNC "FUNC?" TFUNC EXTERN MODULE USE TRACE TRACEALL EOF EOFS BOF NATIVE
    228229  > :: (e.pos) (s.type e.value),
    229230//    <Store &Saved-Position e.pos>,
     
    246247      EXTERN =
    247248        <Parse_Extern_Names>;
    248       \{ FUNC; "FUNC?"; TFUNC; } =
     249      \{ PUBLIC; FUNC; "FUNC?"; TFUNC; } =
    249250        <Parse_Func_Decl s.type>;
    250251      \{ WORD; QWORD; } =
     
    357358Parse_Func_Decl // s.type = e.items
    358359  s.type =
    359     <Expect_Token WORD QWORD> :: (e.pos) (s.WORD_or_QWORD e.origname),
    360       <Make_Decl_Name s.WORD_or_QWORD e.origname> :: s.linkage e.qname,
    361       <Bind_Name (e.qname) ((e.pos) (e.origname) s.type s.linkage () ())>,
    362       <Parse_Format> :: e.in,
    363       <Expect_Token EQUAL> : e,
    364       <Parse_Format> :: e.out,
    365       <Expect_Token SEMICOLON> : e,
    366       <Bind &Names (e.qname) ((e.pos) (e.origname) s.type s.linkage (e.in) (e.out))>,
    367       {
    368         \{
    369           s.linkage : IMPORT;
    370           //<? &Current-Module> : RFI e;
    371         } = (s.linkage s.type <Pragma e.pos> (e.qname) (e.in) (e.out));
    372         ;
    373       };
     360  {
     361    s.type : PUBLIC =
     362      <Expect_Token FUNC "FUNC?" TFUNC> :: t (s.t e),
     363      (PUBLIC) s.t;
     364    () s.type;
     365  } :: (e.public) s.type,
     366  <Expect_Token WORD QWORD> :: (e.pos) (s.WORD_or_QWORD e.origname),
     367  <Make_Decl_Name s.WORD_or_QWORD e.origname> :: s.linkage e.qname,
     368  {
     369    e.public : PUBLIC = EXPORT;
     370    s.linkage;
     371  } :: s.linkage,
     372  <Bind_Name (e.qname) ((e.pos) (e.origname) s.type s.linkage () ())>,
     373  <Parse_Format> :: e.in,
     374  <Expect_Token EQUAL> : e,
     375  <Parse_Format> :: e.out,
     376  <Expect_Token SEMICOLON> : e,
     377  <Bind &Names (e.qname) ((e.pos) (e.origname) s.type s.linkage (e.in) (e.out))>,
     378  {
     379    \{
     380      s.linkage : IMPORT;
     381      //<? &Current-Module> : RFI e;
     382    } = (s.linkage s.type <Pragma e.pos> (e.qname) (e.in) (e.out));
     383    ;
     384  };
    374385
    375386Parse_Trace_Names =
Note: See TracChangeset for help on using the changeset viewer.