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

Subversion Repositories copyblaze

[/] [copyblaze/] [trunk/] [copyblaze/] [sw/] [tools/] [asm/] [pBlazASM/] [pBlazASM/] [pbTypes.h] - Blame information for rev 59

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ameziti
 
2
/*
3
 *  Copyright © 2003..2008 : Henk van Kampen <henk@mediatronix.com>
4
 *
5
 *      This file is part of pBlazASM.
6
 *
7
 *  pBlazASM is free software: you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation, either version 3 of the License, or
10
 *  (at your option) any later version.
11
 *
12
 *  pBlazASM is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with pBlazASM.  If not, see <http://www.gnu.org/licenses/>.
19
 */
20
 
21
typedef unsigned char bool ;
22
#define true (1)
23
#define false (0)
24
 
25
// token types
26
typedef enum {
27
        tNONE = 0,
28
        tERROR,
29
        tLPAREN,
30
        tRPAREN,
31
        tCOMMA,
32
        tCOLON,
33
        tOPERATOR,
34
        tREGISTER,
35
        tOPERAND,
36
        tOPCODE,
37
        tCONDITION,
38
        tIDENT,
39
        tLABEL,
40
        tDIRECTIVE,
41
        tINDEX,
42
        tVALUE,
43
        tCHAR,
44
        tSTRING,
45
        tHEX,
46
        tBIN,
47
        tDEC
48
} type_e ;
49
 
50
// token subtypes
51
typedef enum {
52
        stNONE = 0,
53
        stCOMMENT,
54
 
55
        // instruction types
56
        stMOVE,
57
        stINT,
58
        stINTI,
59
        stINTE,
60
        stCJMP,
61
        stCSKP,
62
        stCRET,
63
        stIO,
64
        stSHIFT,
65
        stINST,
66
 
67
        // operators
68
        stADD,
69
        stSUB,
70
        stAND,
71
        stIOR,
72
        stXOR,
73
        stSHL,
74
        stSHR,
75
        stMUL,
76
        stDIV,
77
        stMOD,
78
        stTILDA,
79
 
80
        // equate types
81
        stVAL,
82
        stREG,
83
        stCLONE,
84
 
85
        // directives
86
        stORG,
87
        stPAGE,
88
 
89
        stIOSP,
90
        stSCRATCHPAD,
91
        stEND,
92
 
93
        stEQU,
94
        stBYTE,
95
        stWORD_BE,
96
        stWORD_LE,
97
        stLONG_BE,
98
        stLONG_LE,
99
        stTEXT,
100
        stBUFFER,
101
        stSFR,
102
 
103
        stDS,
104
        stDSIN,
105
        stDSOUT,
106
        stDSIO,
107
        stDSROM,
108
        stDSRAM,
109
 
110
        // KCPSM3
111
        stADDRESS,
112
        stCONSTANT,
113
        stNAMEREG,
114
 
115
        stVHDL,
116
        stXDL,
117
        stMEM,
118
        stCOE,
119
        stHEX,
120
 
121
        stDOT
122
} subtype_e ;
123
 
124
// token and symbol type
125
typedef struct {
126
        type_e type ;
127
        subtype_e subtype ;
128
        char * text ;
129
        int32_t value ;
130
} symbol_t ;

powered by: WebSVN 2.1.0

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