YACASL2
Loading...
Searching...
No Matches
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
17enum {
19 OPDSIZE = 40,
20};
21
25enum {
26 LINESIZE = 1024,
27 TOKENSIZE = 256,
28};
29
33typedef struct {
34 int opdc;
35 char *opdv[OPDSIZE];
36} OPD;
37
41typedef struct {
42 char *label;
43 char *cmd;
45} CMDLINE;
46
51void addcerrlist_tok();
52
60CMDLINE *linetok(const char *line);
61
62#endif
命令行を表すデータ型
Definition token.h:41
OPD * opd
Definition token.h:44
char * cmd
Definition token.h:43
char * label
Definition token.h:42
オペランドを表すデータ型
Definition token.h:33
int opdc
Definition token.h:34
char * opdv[OPDSIZE]
Definition token.h:35
CMDLINE * linetok(const char *line)
行から、ラベル・コマンド・オペランドを取得する
Definition token.c:97
void addcerrlist_tok()
トークン取得のエラーを追加する
Definition token.c:91
@ TOKENSIZE
Definition token.h:27
@ LINESIZE
Definition token.h:26
@ LABELSIZE
Definition token.h:18
@ OPDSIZE
Definition token.h:19