Main Page | Class List | Directories | File List | Class Members | File Members

cc_scan.c File Reference

CKPM C compiler scanner. More...

#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include "cpp_io.h"
#include "cpp_conv.h"
#include "cpp_token.h"
#include "cc_scan.h"

Functions

int isDigit (char ch)
 check if a given character is a digit
int isOctDigit (char ch)
 check if a given character is a octal digit
int isHexDigit (char ch)
 check if a given character is a hex digit
int isLetter (char ch)
 check if a given character is a letter
int isSpace (char ch)
 check if a given character is a white space
void appendChar (char *s, char ch)
 append a character to a null terminated string
int read_byte (int fd, char *c)
 read one byte
void GetSymIntCC (int fd, struct _token *t)
 get next symbol (internal)
char * SymToStringCC (int sym)
 convert symbols to the corresponding text


Detailed Description

CKPM C compiler scanner.


Function Documentation

void appendChar char *  s,
char  ch
 

append a character to a null terminated string

Parameters:
s the string
ch the character to be appended

void GetSymIntCC int  fd,
struct _token t
 

get next symbol (internal)

Parameters:
fd file descriptor index of the input file
t contains a complete token

int isDigit char  ch  ) 
 

check if a given character is a digit

Parameters:
ch the character to be checked
Returns:
!=0 if the character is a digit, otherwise 0

int isHexDigit char  ch  ) 
 

check if a given character is a hex digit

Parameters:
ch the character to be checked
Returns:
!=0 if the character is a hex digit, otherwise 0

int isLetter char  ch  ) 
 

check if a given character is a letter

Parameters:
ch the character to be checked
Returns:
!=0 if the character is a letter, otherwise 0

int isOctDigit char  ch  ) 
 

check if a given character is a octal digit

Parameters:
ch the character to be checked
Returns:
!=0 if the character is a digit, otherwise 0

int isSpace char  ch  ) 
 

check if a given character is a white space

Parameters:
ch the character to be checked
Returns:
!=0 if the character is a white space, otherwise 0

int read_byte int  fd,
char *  c
 

read one byte

Parameters:
fd file descriptor index of the input file
c the output variable containing the byte
Returns:
status on from file read

char* SymToStringCC int  sym  ) 
 

convert symbols to the corresponding text

Parameters:
sym the symbol
Returns:
the symbol as a string


Generated on Thu Jul 13 03:56:36 2006 for CKPMcc by  doxygen 1.4.4