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

Subversion Repositories tinyvliw8

[/] [tinyvliw8/] [trunk/] [tools/] [asm/] [src/] [tokens.l] - Blame information for rev 5

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

Line No. Rev Author Line
1 5 steckol
%{
2
 
3
        extern void nextline();
4
 
5
6
 
7
%}
8
 
9
 
10
 
11
".res"      { return RESSEC; }
12
 
13
".irq"[0-3] { yylval.num = yytext[4] - '0'; return IRQSEC; }
14
 
15
 
16
 
17
"st"        { return STORE; }
18
 
19
"rlc"       { return RLC; }
20
 
21
"rrc"       { return RRC; }
22
 
23
"addi"      { return ADDI; }
24
 
25
"or"        { return OR; }
26
 
27
"xnor"      { return XNOR; }
28
 
29
"and"       { return AND; }
30
 
31
"jmp"       { return JMP; }
32
 
33
"jz"        { return JZ; }
34
 
35
":"         { return COLON; }
36
 
37
"+"         { return PLUS; }
38
 
39
"~"         { return TILDE; }
40
 
41
"$"         { return DOLLAR; }
42
 
43
"@"         { return AT; }
44
 
45
r[0-7]                  { yylval.num = yytext[1] - '0'; return REG; }
46
 
47
0x[0-7][0-9a-f][0-9a-f] { yylval.num = strtol(&yytext[2], 0, 16); return HEXADDR; }
48
 
49
[A-Z]+                  { yylval.str = strdup(yytext); return UNAME; }
50
 
51
\n       { nextline(); return NEWLINE;}
52
 
53
.        { yyerror("illegal token\n"); }
54
 
55
#ifndef yywrap
56
 
57
#endif
58
 
59

powered by: WebSVN 2.1.0

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