OpenCores
URL https://opencores.org/ocsvn/raptor64/raptor64/trunk

Subversion Repositories raptor64

[/] [raptor64/] [trunk/] [software/] [c64/] [source/] [ParseDeclarations.c] - Diff between revs 37 and 51

Show entire file | Details | Blame | View Log

Rev 37 Rev 51
Line 332... Line 332...
        temp1->val_flag = 1;
        temp1->val_flag = 1;
        temp1->btp = head;
        temp1->btp = head;
        head = temp1;
        head = temp1;
        if( lastst == closepa) {
        if( lastst == closepa) {
            NextToken();
            NextToken();
 
            temp1->type = bt_ifunc;                     // this line wasn't present
            if(lastst == begin)
            if(lastst == begin)
                temp1->type = bt_ifunc;
                temp1->type = bt_ifunc;
        }
        }
        else
        else
            temp1->type = bt_ifunc;
            temp1->type = bt_ifunc;
Line 378... Line 379...
 */
 */
int declare(TABLE *table,int al,int ilc,int ztype)
int declare(TABLE *table,int al,int ilc,int ztype)
{
{
        SYM *sp, *sp1, *sp2;
        SYM *sp, *sp1, *sp2;
    TYP *dhead;
    TYP *dhead;
 
        char stnm[200];
 
 
    static long old_nbytes;
    static long old_nbytes;
    int nbytes;
    int nbytes;
 
 
        nbytes = 0;
        nbytes = 0;
Line 411... Line 413...
                                        dseg();
                                        dseg();
                                        GenerateByte(0);
                                        GenerateByte(0);
                }
                }
                ++nbytes;
                ++nbytes;
            }
            }
            if( al == sc_static)
                        if( al == sc_static) {
                                sp->value.i = nextlabel++;
                                sp->value.i = nextlabel++;
 
                        }
                        else if( ztype == bt_union)
                        else if( ztype == bt_union)
                sp->value.i = ilc;
                sp->value.i = ilc;
            else if( al != sc_auto )
            else if( al != sc_auto )
                sp->value.i = ilc + nbytes;
                sp->value.i = ilc + nbytes;
            else
            else
Line 524... Line 527...
                NextToken();
                NextToken();
                                lc_static += declare(&gsyms,sc_static,lc_static,bt_struct);
                                lc_static += declare(&gsyms,sc_static,lc_static,bt_struct);
                break;
                break;
        case kw_extern:
        case kw_extern:
                NextToken();
                NextToken();
                                if (lastst==kw_oscall || lastst==kw_interrupt || lastst==kw_nocall)
                                if (lastst==kw_pascal) {
 
                                        isPascal = TRUE;
 
                                        NextToken();
 
                                }
 
                                else if (lastst==kw_oscall || lastst==kw_interrupt || lastst==kw_nocall)
                                        NextToken();
                                        NextToken();
                ++global_flag;
                ++global_flag;
                declare(&gsyms,sc_external,0,bt_struct);
                declare(&gsyms,sc_external,0,bt_struct);
                --global_flag;
                --global_flag;
                break;
                break;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.