mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-01-23 19:08:00 +00:00
as: token: handle .data directive
This commit is contained in:
parent
d18a218203
commit
3030d31385
@ -29,6 +29,7 @@
|
||||
-spec from_symbol(string()) -> token().
|
||||
from_symbol(Name) ->
|
||||
case Name of
|
||||
".data" -> ?T_DOT_DATA;
|
||||
".file" -> ?T_DOT_FILE;
|
||||
".globl" -> ?T_DOT_GLOBL;
|
||||
".ident" -> ?T_DOT_IDENT;
|
||||
@ -45,6 +46,7 @@ from_symbol(Name) ->
|
||||
-spec format(token()) -> io_lib:chars().
|
||||
format(Token) ->
|
||||
case Token of
|
||||
?T_DOT_DATA -> ".data";
|
||||
?T_DOT_FILE -> ".file";
|
||||
?T_DOT_GLOBL -> ".globl";
|
||||
?T_DOT_IDENT -> ".ident";
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
%% with attributes (ordinary symbols, literals, errors).
|
||||
|
||||
%% reserved symbols including directives
|
||||
-define(T_DOT_DATA, 'T_DOT_DATA'). % .data
|
||||
-define(T_DOT_FILE, 'T_DOT_FILE'). % .file
|
||||
-define(T_DOT_GLOBL, 'T_DOT_GLOBL'). % .globl
|
||||
-define(T_DOT_IDENT, 'T_DOT_IDENT'). % .ident
|
||||
@ -58,7 +59,8 @@
|
||||
-define(T_NEWLINE, 'T_NEWLINE'). % <end-of-line>
|
||||
-define(T_EOF, 'T_EOF'). % <end-of-file>
|
||||
|
||||
-type token() :: ?T_DOT_FILE
|
||||
-type token() :: ?T_DOT_DATA
|
||||
| ?T_DOT_FILE
|
||||
| ?T_DOT_GLOBL
|
||||
| ?T_DOT_IDENT
|
||||
| ?T_DOT_POPSECTION
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user