 41d481b065
			
		
	
	
		41d481b065
		
	
	
	
	
		
			
			- an asmconv based tool for conversion from GNU ia32 assembly to ACK assembly
    
    - in contrast to asmconv it is a one way tool only
    
    - as the GNU assembly in Minix does not prefix global C symbols with _ gas2ack
      detects such symbols and prefixes them to be compliant with the ACK convention
    
    - gas2ack preserves comments and unexpanded macros
    
    - bunch of fixes to the asmconv GNU->ACK direction
    
    - support of more instructions that ACK does not know but are in use in Minix
    
    - it is meant as a temporary solution as long as ACK will be a supported
      compiler for the core system
		
	
			
		
			
				
	
	
		
			33 lines
		
	
	
		
			760 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			760 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*	token.h - token definition			Author: Kees J. Bot
 | |
|  *								13 Dec 1993
 | |
|  */
 | |
| 
 | |
| typedef enum toktype {
 | |
| 	T_EOF,
 | |
| 	T_CHAR,
 | |
| 	T_WORD,
 | |
| 	T_STRING,
 | |
| 	T_COMMENT,
 | |
| 	T_C_PREPROCESSOR
 | |
| } toktype_t;
 | |
| 
 | |
| typedef struct token {
 | |
| 	struct token	*next;
 | |
| 	long		line;
 | |
| 	toktype_t	type;
 | |
| 	int		symbol;		/* Single character symbol. */
 | |
| 	char		*name;		/* Word, number, etc. */
 | |
| 	size_t		len;		/* Length of string. */
 | |
| } token_t;
 | |
| 
 | |
| #define S_LEFTSHIFT	0x100		/* << */
 | |
| #define S_RIGHTSHIFT	0x101		/* >> */
 | |
| 
 | |
| void set_file(char *file, long line);
 | |
| void get_file(char **file, long *line);
 | |
| void parse_err(int err, token_t *where, const char *fmt, ...);
 | |
| void parse_warn(int err, token_t *t, const char *fmt, ...);
 | |
| void tok_init(char *file, int comment);
 | |
| token_t *get_token(int n);
 | |
| void skip_token(int n);
 |