stage1_2/stage1_2_priv.hh
changeset 136 32bd7ef40897
parent 86 1988bf1634da
child 175 dadda1b5401e
equal deleted inserted replaced
135:0f3f6714b938 136:32bd7ef40897
    65 /*********************************************/
    65 /*********************************************/
    66 /* This is a service that flex provides to bison... */
    66 /* This is a service that flex provides to bison... */
    67 void print_include_stack(void);
    67 void print_include_stack(void);
    68 
    68 
    69 
    69 
    70 
       
    71 /**************************************/
    70 /**************************************/
    72 /* The name of the file being parsed. */
    71 /* The name of the file being parsed. */
    73 /**************************************/
    72 /**************************************/
    74 /* The name of the file currently being parsed...
    73 /* The name of the file currently being parsed...
    75  * Note that flex accesses and updates this global variable
    74  * Note that flex accesses and updates this global variable
    79  * Note that bison also sets this variable correctly to the first
    78  * Note that bison also sets this variable correctly to the first
    80  * file being parsed.
    79  * file being parsed.
    81  */
    80  */
    82 extern const char *current_filename;
    81 extern const char *current_filename;
    83 
    82 
       
    83 #define MAX_BUFFER_LENGTH 1000
    84 
    84 
       
    85 typedef struct {
       
    86     int eof;
       
    87     int lineNumber;
       
    88     int currentChar;
       
    89     int lineLength;
       
    90     int currentTokenStart;
       
    91     char* buffer;
       
    92     FILE *in_file;
       
    93   } tracking_t;
       
    94 
       
    95 int GetNextChar(char *b, int maxBuffer);
       
    96 tracking_t* GetNewTracking(FILE* in_file);
    85 
    97 
    86 /****************************************************/
    98 /****************************************************/
    87 /* Controlling the entry to the body_state in flex. */
    99 /* Controlling the entry to the body_state in flex. */
    88 /****************************************************/
   100 /****************************************************/
    89 void cmd_goto_body_state(void);
   101 void cmd_goto_body_state(void);