j8takagi.net
>
YACASL2
> 内部仕様書 -
Doxygen
|
GNU Global
YACASL2
Loading...
Searching...
No Matches
include
token.h
Go to the documentation of this file.
1
#ifndef YACASL2_TOKEN_H_INCLUDED
2
#define YACASL2_TOKEN_H_INCLUDED
3
4
#include <stdio.h>
5
#include <stdlib.h>
6
#include <string.h>
7
#include <stdbool.h>
8
#include <ctype.h>
9
#include <assert.h>
10
#include <errno.h>
11
#include "
cerr.h
"
12
#include "
cmem.h
"
13
17
enum
{
18
LABELSIZE
= 8,
19
OPDSIZE
= 40,
20
LITERALSIZE
= 5,
21
};
22
26
enum
{
27
LINESIZE
= 1024,
28
TOKENSIZE
= 256,
29
};
30
34
typedef
struct
{
35
int
opdc
;
36
char
*
opdv
[
OPDSIZE
];
37
}
OPD
;
38
42
typedef
struct
{
43
char
*
label
;
44
char
*
cmd
;
45
OPD
*
opd
;
46
}
CMDLINE
;
47
52
void
addcerrlist_tok
();
53
61
CMDLINE
*
linetok
(
const
char
*line);
62
63
#endif
cerr.h
cmem.h
CMDLINE
命令行を表すデータ型
Definition
token.h:42
CMDLINE::opd
OPD * opd
Definition
token.h:45
CMDLINE::cmd
char * cmd
Definition
token.h:44
CMDLINE::label
char * label
Definition
token.h:43
OPD
オペランドを表すデータ型
Definition
token.h:34
OPD::opdc
int opdc
Definition
token.h:35
OPD::opdv
char * opdv[OPDSIZE]
Definition
token.h:36
linetok
CMDLINE * linetok(const char *line)
行から、ラベル・コマンド・オペランドを取得する
Definition
token.c:97
addcerrlist_tok
void addcerrlist_tok()
トークン取得のエラーを追加する
Definition
token.c:91
TOKENSIZE
@ TOKENSIZE
Definition
token.h:28
LINESIZE
@ LINESIZE
Definition
token.h:27
LABELSIZE
@ LABELSIZE
Definition
token.h:18
LITERALSIZE
@ LITERALSIZE
Definition
token.h:20
OPDSIZE
@ OPDSIZE
Definition
token.h:19
Generated on
for YACASL2 by
1.14.0