PIPS
clexer.c File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <ctype.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "ri-util.h"
#include "misc.h"
#include "c_syntax.h"
#include "cyacc.h"
#include <unistd.h>
+ Include dependency graph for clexer.c:

Go to the source code of this file.

Data Structures

struct  yy_buffer_state
 
struct  yy_trans_info
 This struct is not used in this scanner, but its presence is necessary. More...
 

Macros

#define YY_INT_ALIGNED   short int
 
#define yy_create_buffer   c__create_buffer
 A lexical scanner generated by flex. More...
 
#define yy_delete_buffer   c__delete_buffer
 
#define yy_scan_buffer   c__scan_buffer
 
#define yy_scan_string   c__scan_string
 
#define yy_scan_bytes   c__scan_bytes
 
#define yy_init_buffer   c__init_buffer
 
#define yy_flush_buffer   c__flush_buffer
 
#define yy_load_buffer_state   c__load_buffer_state
 
#define yy_switch_to_buffer   c__switch_to_buffer
 
#define yypush_buffer_state   c_push_buffer_state
 
#define yypop_buffer_state   c_pop_buffer_state
 
#define yyensure_buffer_stack   c_ensure_buffer_stack
 
#define yy_flex_debug   c__flex_debug
 
#define yyin   c_in
 
#define yyleng   c_leng
 
#define yylex   c_lex
 
#define yylineno   c_lineno
 
#define yyout   c_out
 
#define yyrestart   c_restart
 
#define yytext   c_text
 
#define yywrap(void)   c_wrap
 Macros after this point can all be overridden by user definitions in section 1. More...
 
#define yyalloc   c_alloc
 
#define yyrealloc   c_realloc
 
#define yyfree   c_free
 
#define FLEX_SCANNER
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   6
 
#define YY_FLEX_SUBMINOR_VERSION   4
 
#define FLEX_BETA
 
#define c__create_buffer_ALREADY_DEFINED
 
#define c__delete_buffer_ALREADY_DEFINED
 
#define c__scan_buffer_ALREADY_DEFINED
 
#define c__scan_string_ALREADY_DEFINED
 
#define c__scan_bytes_ALREADY_DEFINED
 
#define c__init_buffer_ALREADY_DEFINED
 
#define c__flush_buffer_ALREADY_DEFINED
 
#define c__load_buffer_state_ALREADY_DEFINED
 
#define c__switch_to_buffer_ALREADY_DEFINED
 
#define c_push_buffer_state_ALREADY_DEFINED
 
#define c_pop_buffer_state_ALREADY_DEFINED
 
#define c_ensure_buffer_stack_ALREADY_DEFINED
 
#define c_lex_ALREADY_DEFINED
 
#define c_restart_ALREADY_DEFINED
 
#define yylex_init   c_lex_init
 
#define yylex_init_extra   c_lex_init_extra
 
#define yylex_destroy(void)   c_lex_destroy
 Accessor methods to globals. More...
 
#define yyget_debug   c_get_debug
 
#define yyset_debug   c_set_debug
 
#define yyget_extra   c_get_extra
 
#define yyset_extra   c_set_extra
 
#define yyget_in   c_get_in
 
#define yyset_in   c_set_in
 
#define yyget_out   c_get_out
 
#define yyset_out   c_set_out
 
#define yyget_leng   c_get_leng
 
#define yyget_text   c_get_text
 
#define yyget_lineno   c_get_lineno
 
#define yyset_lineno   c_set_lineno
 
#define c_wrap_ALREADY_DEFINED
 
#define c_alloc_ALREADY_DEFINED
 
#define c_realloc_ALREADY_DEFINED
 
#define c_free_ALREADY_DEFINED
 
#define c_text_ALREADY_DEFINED
 
#define c_leng_ALREADY_DEFINED
 
#define c_in_ALREADY_DEFINED
 
#define c_out_ALREADY_DEFINED
 
#define c__flex_debug_ALREADY_DEFINED
 
#define c_lineno_ALREADY_DEFINED
 
#define FLEXINT_H
 First, we deal with platform-specific or compiler-specific issues. More...
 
#define INT8_MIN   (-128)
 Limits of integral types. More...
 
#define INT16_MIN   (-32767-1)
 
#define INT32_MIN   (-2147483647-1)
 
#define INT8_MAX   (127)
 
#define INT16_MAX   (32767)
 
#define INT32_MAX   (2147483647)
 
#define UINT8_MAX   (255U)
 
#define UINT16_MAX   (65535U)
 
#define UINT32_MAX   (4294967295U)
 
#define SIZE_MAX   (~(size_t)0)
 
#define yyconst   const
 ! C99 More...
 
#define yynoreturn
 
#define YY_NULL   0
 Returned upon end-of-file. More...
 
#define YY_SC_TO_UI(c)   ((YY_CHAR) (c))
 Promotes a possibly negative, possibly signed char to an integer in range [0..255] for use as an array index. More...
 
#define BEGIN   (yy_start) = 1 + 2 *
 Enter a start condition. More...
 
#define YY_START   (((yy_start) - 1) / 2)
 Translate the current start state into a value that can be later handed to BEGIN to return to the state. More...
 
#define YYSTATE   YY_START
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 Action number for EOF rule of a given start state. More...
 
#define YY_NEW_FILE   yyrestart( yyin )
 Special action meaning "start processing a new file". More...
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_BUF_SIZE   16384
 Size of default input buffer. More...
 
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 ia64 More...
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define YY_LESS_LINENO(n)
 Note: We specifically omit the test for yy_rule_can_match_eol because it requires access to the local variable yy_act. More...
 
#define YY_LINENO_REWIND_TO(dst)
 
#define yyless(n)
 Return all but the first "n" matched characters back to the input stream. More...
 
#define unput(c)   yyunput( c, (yytext_ptr) )
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_BUFFER_EOF_PENDING   2
 When an EOF's been seen but there's still some text to process then we mark the buffer as YY_EOF_PENDING, to indicate that we shouldn't try reading from the input source any more. More...
 
#define YY_CURRENT_BUFFER
 We provide macros for accessing buffer states in case in the future we want to put the buffer states in a more general "scanner state". More...
 
#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]
 Same as previous macro, but useful when we know that the buffer stack is not NULL or when we need an lvalue. More...
 
#define YY_FLUSH_BUFFER   yy_flush_buffer( YY_CURRENT_BUFFER )
 
#define yy_new_buffer   yy_create_buffer
 
#define yy_set_interactive(is_interactive)
 
#define yy_set_bol(at_bol)
 
#define YY_AT_BOL()   (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
#define yytext_ptr   yytext
 
#define YY_DO_BEFORE_ACTION
 Done after the current pattern has been matched and before the corresponding action - sets up yytext. More...
 
#define YY_NUM_RULES   73
 
#define YY_END_OF_BUFFER   74
 
#define REJECT   reject_used_but_not_detected
 The intent behind this definition is that it'll catch any uses of REJECT which flex missed. More...
 
#define yymore()   yymore_used_but_not_detected
 
#define YY_MORE_ADJ   0
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define YY_NO_INPUT   1
 
#define TOKEN_UNDEFINED   (-1)
 The lexer cannot handle the ambiguity between named types and variables without extra-help. More...
 
#define LEXER_RETURN(t)
 This is going to be the previous token because LEXER_RETURN is not used in case the lexer handles either a named type or a variable. More...
 
#define SIMPLE_LEXER_RETURN(t)
 Some tokens, such as { and } do not mean that a statement has been entered. More...
 
#define TK_TYPE_P(tk)
 
#define INITIAL   0
 This should be used instead of the manual computation of C_line_number... More...
 
#define the_end_of_pragma   1
 
#define YY_EXTRA_TYPE   void *
 Special case for "unistd.h", since it is non-ANSI. More...
 
#define YY_READ_BUF_SIZE   8192
 Amount of stuff to slurp up with each read. More...
 
#define ECHO   do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
 ia64 More...
 
#define YY_INPUT(buf, result, max_size)
 Gets input and stuffs it into "buf". More...
 
#define yyterminate()   return YY_NULL
 No semi-colon after return; correct usage is to write "yyterminate();" - we don't want an extra ';' after the "return" because that will cause some compilers to complain about unreachable statements. More...
 
#define YY_START_STACK_INCR   25
 Number of entries by which start-condition stack grows. More...
 
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg )
 Report a fatal error. More...
 
#define YY_DECL_IS_OURS   1
 end tables serialization structures and prototypes More...
 
#define YY_DECL   int yylex (void)
 
#define YY_USER_ACTION
 !YY_DECL More...
 
#define YY_BREAK   /**INTED*/break;
 Code executed at the end of each rule. More...
 
#define YY_RULE_SETUP
 
#define YY_EXIT_FAILURE   2
 
#define yyless(n)
 Return all but the first "n" matched characters back to the input stream. More...
 
#define YYTABLES_NAME   "yytables"
 

Typedefs

typedef signed char flex_int8_t
 C99 systems have <inttypes.h>. More...
 
typedef short int flex_int16_t
 
typedef int flex_int32_t
 
typedef unsigned char flex_uint8_t
 
typedef unsigned short int flex_uint16_t
 
typedef unsigned int flex_uint32_t
 
typedef struct yy_buffer_stateYY_BUFFER_STATE
 
typedef size_t yy_size_t
 
typedef flex_uint8_t YY_CHAR
 Begin user sect3. More...
 
typedef int yy_state_type
 

Functions

void yyrestart (FILE *input_file)
 
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
YY_BUFFER_STATE yy_create_buffer (FILE *file, int size)
 
void yy_delete_buffer (YY_BUFFER_STATE b)
 
void yy_flush_buffer (YY_BUFFER_STATE b)
 
void yypush_buffer_state (YY_BUFFER_STATE new_buffer)
 
static void yy_init_buffer (YY_BUFFER_STATE b, FILE *file)
 
YY_BUFFER_STATE yy_scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE yy_scan_string (const char *yy_str)
 
YY_BUFFER_STATE yy_scan_bytes (const char *bytes, int len)
 
void * yyalloc (yy_size_t)
 
void * yyrealloc (void *, yy_size_t)
 
void yyfree (void *)
 
static yy_state_type yy_get_previous_state (void)
 
static yy_state_type yy_try_NUL_trans (yy_state_type current_state)
 
static int yy_get_next_buffer (void)
 
static void yynoreturn yy_fatal_error (const char *msg)
 
int get_previous_c_lineno ()
 
unsigned int character_occurences_in_string (string s, char c)
 Use a stack to survive to file inclusions if any. More...
 
int get_current_C_line_number (void)
 
int get_previous_C_line_number (void)
 Should be called just before get_current_C_line_number. More...
 
void set_current_C_line_number (void)
 
void push_current_C_line_number (void)
 The line number stack, designed for structured control structure, is not used yet. More...
 
int pop_current_C_line_number (void)
 
void reset_current_C_line_number (void)
 
void error_reset_current_C_line_number (void)
 
void reset_token_has_been_seen_p ()
 
string get_current_C_comment (void)
 Return the current comment as a string to be freed by the caller and reset the current comment. More...
 
void push_current_C_comment (void)
 Push the current C comment so that we can get it back when building the statement later. More...
 
string pop_current_C_comment (void)
 Pop the current comment. More...
 
void update_C_comment (string a_comment)
 Add a comment to the current one. More...
 
void remove_LFs_from_C_comment (int extra_LF)
 Remove "extra_LF" trailing LF from C_current_comment if they can be found at the end of the comment string. More...
 
void discard_C_comment ()
 Discard a C comment because we don't know how to deal with it. More...
 
void reset_C_comment (bool is_compilation_unit_p)
 reset and reset_error should be handled differently More...
 
void error_reset_C_comment (bool is_compilation_unit_p __attribute__((__unused__)))
 
void clear_C_comment ()
 
void init_C_comment ()
 
static void bsd_rewrite (char **pyytext)
 compatibility layer for BSD More...
 
static int is_c_parser_keyword_typedef (char *id)
 See if id is a keyword, a typedef or an identifier. More...
 
static int yy_init_globals (void)
 
void yyset_debug (int debug_flag)
 
void yyset_extra (YY_EXTRA_TYPE user_defined)
 
void yyset_in (FILE *_in_str)
 
void yyset_out (FILE *_out_str)
 
void yyset_lineno (int _line_number)
 
 if (!(yy_init))
 

Variables

int yyleng
 number of characters read into yy_ch_buf More...
 
FILE * yyin
 
FILE * yyout
 
static size_t yy_buffer_stack_top = 0
 !YY_STRUCT_YY_BUFFER_STATE More...
 
static size_t yy_buffer_stack_max = 0
 capacity of stack. More...
 
static YY_BUFFER_STATEyy_buffer_stack = NULL
 Stack as an array. More...
 
static char yy_hold_char
 yy_hold_char holds the character lost when yytext is formed. More...
 
static int yy_n_chars
 
static char * yy_c_buf_p = NULL
 Points to current character in buffer. More...
 
static int yy_init = 0
 
static int yy_start = 0
 whether we need to initialize More...
 
static int yy_did_buffer_switch_on_eof
 start state number More...
 
int yylineno = 1
 Begin user sect3. More...
 
char * yytext
 
static const flex_int16_t yy_accept [282]
 
static const YY_CHAR yy_ec [256]
 
static const YY_CHAR yy_meta [65]
 
static const flex_int16_t yy_base [329]
 
static const flex_int16_t yy_def [329]
 
static const flex_int16_t yy_nxt [903]
 
static const flex_int16_t yy_chk [903]
 
static const flex_int32_t yy_rule_can_match_eol [74]
 Table of booleans, true if rule could match eol. More...
 
static yy_state_type yy_last_accepting_state
 
static char * yy_last_accepting_cpos
 
int yy_flex_debug = 0
 
static int C_line_number = UNDEFINED_C_LINE_NUMBER
 To track the user line number, that is the one in the original user file. More...
 
int C_line_increment = 1
 The line increment is set to zero when header files are parsed. More...
 
static int previous_c_lineno = UNDEFINED_C_LINE_NUMBER
 To keep track of line intervals. More...
 
static int previous_C_line_number = UNDEFINED_C_LINE_NUMBER
 
static string C_current_comment = string_undefined
 Comment management: More...
 
static bool token_has_been_seen_p = false
 To see if comments are collected within a statement or outside it is pretty easy to turn it on. More...
 
static int bracket_depth = -1
 
static int previous_keyword_token = TOKEN_UNDEFINED
 
 YY_DECL
 The main scanner function which does all the work. More...
 
char * yy_cp
 
char * yy_bp
 
int yy_act
 

Macro Definition Documentation

◆ BEGIN

#define BEGIN   (yy_start) = 1 + 2 *

Enter a start condition.

This macro really ought to take a parameter, but we do it the disgusting crufty way forced on us by the ()-less definition of BEGIN.

Definition at line 376 of file clexer.c.

◆ c__create_buffer_ALREADY_DEFINED

#define c__create_buffer_ALREADY_DEFINED

Definition at line 42 of file clexer.c.

◆ c__delete_buffer_ALREADY_DEFINED

#define c__delete_buffer_ALREADY_DEFINED

Definition at line 48 of file clexer.c.

◆ c__flex_debug_ALREADY_DEFINED

#define c__flex_debug_ALREADY_DEFINED

Definition at line 264 of file clexer.c.

◆ c__flush_buffer_ALREADY_DEFINED

#define c__flush_buffer_ALREADY_DEFINED

Definition at line 78 of file clexer.c.

◆ c__init_buffer_ALREADY_DEFINED

#define c__init_buffer_ALREADY_DEFINED

Definition at line 72 of file clexer.c.

◆ c__load_buffer_state_ALREADY_DEFINED

#define c__load_buffer_state_ALREADY_DEFINED

Definition at line 84 of file clexer.c.

◆ c__scan_buffer_ALREADY_DEFINED

#define c__scan_buffer_ALREADY_DEFINED

Definition at line 54 of file clexer.c.

◆ c__scan_bytes_ALREADY_DEFINED

#define c__scan_bytes_ALREADY_DEFINED

Definition at line 66 of file clexer.c.

◆ c__scan_string_ALREADY_DEFINED

#define c__scan_string_ALREADY_DEFINED

Definition at line 60 of file clexer.c.

◆ c__switch_to_buffer_ALREADY_DEFINED

#define c__switch_to_buffer_ALREADY_DEFINED

Definition at line 90 of file clexer.c.

◆ c_alloc_ALREADY_DEFINED

#define c_alloc_ALREADY_DEFINED

Definition at line 222 of file clexer.c.

◆ c_ensure_buffer_stack_ALREADY_DEFINED

#define c_ensure_buffer_stack_ALREADY_DEFINED

Definition at line 108 of file clexer.c.

◆ c_free_ALREADY_DEFINED

#define c_free_ALREADY_DEFINED

Definition at line 234 of file clexer.c.

◆ c_in_ALREADY_DEFINED

#define c_in_ALREADY_DEFINED

Definition at line 252 of file clexer.c.

◆ c_leng_ALREADY_DEFINED

#define c_leng_ALREADY_DEFINED

Definition at line 246 of file clexer.c.

◆ c_lex_ALREADY_DEFINED

#define c_lex_ALREADY_DEFINED

Definition at line 114 of file clexer.c.

◆ c_lineno_ALREADY_DEFINED

#define c_lineno_ALREADY_DEFINED

Definition at line 270 of file clexer.c.

◆ c_out_ALREADY_DEFINED

#define c_out_ALREADY_DEFINED

Definition at line 258 of file clexer.c.

◆ c_pop_buffer_state_ALREADY_DEFINED

#define c_pop_buffer_state_ALREADY_DEFINED

Definition at line 102 of file clexer.c.

◆ c_push_buffer_state_ALREADY_DEFINED

#define c_push_buffer_state_ALREADY_DEFINED

Definition at line 96 of file clexer.c.

◆ c_realloc_ALREADY_DEFINED

#define c_realloc_ALREADY_DEFINED

Definition at line 228 of file clexer.c.

◆ c_restart_ALREADY_DEFINED

#define c_restart_ALREADY_DEFINED

Definition at line 120 of file clexer.c.

◆ c_text_ALREADY_DEFINED

#define c_text_ALREADY_DEFINED

Definition at line 240 of file clexer.c.

◆ c_wrap_ALREADY_DEFINED

#define c_wrap_ALREADY_DEFINED

Definition at line 216 of file clexer.c.

◆ ECHO

#define ECHO   do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)

ia64

Copy whatever the last rule matched to the standard output. This used to be an fputs(), but since the string might contain NUL's, we now use fwrite().

Definition at line 1738 of file clexer.c.

◆ EOB_ACT_CONTINUE_SCAN

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 420 of file clexer.c.

◆ EOB_ACT_END_OF_FILE

#define EOB_ACT_END_OF_FILE   1

Definition at line 421 of file clexer.c.

◆ EOB_ACT_LAST_MATCH

#define EOB_ACT_LAST_MATCH   2

Definition at line 422 of file clexer.c.

◆ FLEX_BETA

#define FLEX_BETA

Definition at line 38 of file clexer.c.

◆ FLEX_SCANNER

#define FLEX_SCANNER

Definition at line 33 of file clexer.c.

◆ FLEXINT_H

#define FLEXINT_H

First, we deal with platform-specific or compiler-specific issues.

begin standard C headers. end standard C headers. flex integer type definitions

Definition at line 288 of file clexer.c.

◆ INITIAL

#define INITIAL   0

This should be used instead of the manual computation of C_line_number...

but C_line_number is adjusted according to the preprocessor line pragmas. To deal more cleanly with the comments: x COMMENT To deal cleanly with complex pragma line escape, use a separate state: From C norm A.1: "

Definition at line 1644 of file clexer.c.

◆ INT16_MAX

#define INT16_MAX   (32767)

Definition at line 330 of file clexer.c.

◆ INT16_MIN

#define INT16_MIN   (-32767-1)

Definition at line 321 of file clexer.c.

◆ INT32_MAX

#define INT32_MAX   (2147483647)

Definition at line 333 of file clexer.c.

◆ INT32_MIN

#define INT32_MIN   (-2147483647-1)

Definition at line 324 of file clexer.c.

◆ INT8_MAX

#define INT8_MAX   (127)

Definition at line 327 of file clexer.c.

◆ INT8_MIN

#define INT8_MIN   (-128)

Limits of integral types.

Definition at line 318 of file clexer.c.

◆ LEXER_RETURN

#define LEXER_RETURN (   t)
Value:
return(token_has_been_seen_p = true, \
/**enultimate_keyword_token=previous_keyword_token,*/ \
static int previous_keyword_token
Definition: clexer.c:1552
static bool token_has_been_seen_p
To see if comments are collected within a statement or outside it is pretty easy to turn it on.
Definition: clexer.c:1268

This is going to be the previous token because LEXER_RETURN is not used in case the lexer handles either a named type or a variable.

Definition at line 1557 of file clexer.c.

◆ REJECT

#define REJECT   reject_used_but_not_detected

The intent behind this definition is that it'll catch any uses of REJECT which flex missed.

Definition at line 1024 of file clexer.c.

◆ SIMPLE_LEXER_RETURN

#define SIMPLE_LEXER_RETURN (   t)
Value:
return( \
/**enultimate_keyword_token=previous_keyword_token,*/ \

Some tokens, such as { and } do not mean that a statement has been entered.

Definition at line 1562 of file clexer.c.

◆ SIZE_MAX

#define SIZE_MAX   (~(size_t)0)

Definition at line 346 of file clexer.c.

◆ the_end_of_pragma

#define the_end_of_pragma   1

Definition at line 1645 of file clexer.c.

◆ TK_TYPE_P

#define TK_TYPE_P (   tk)
Value:
((tk)==TK_CHAR || (tk)==TK_INT || \
(tk)==TK_DOUBLE || (tk)==TK_FLOAT || (tk)==TK_COMPLEX || \
(tk)==TK_ENUM || (tk)==TK_STRUCT || (tk)==TK_UNION || \
(tk)==TK_SIGNED|| (tk)==TK_UNSIGNED|| (tk)==TK_LONG|| (tk)==TK_SHORT ||\
(tk)==TK_RETURN)
#define TK_SHORT
Definition: splitc.c:779
#define TK_RETURN
Definition: splitc.c:840
#define TK_COMPLEX
Definition: splitc.c:771
#define TK_STRUCT
Definition: splitc.c:773
#define TK_INT
Definition: splitc.c:765
#define TK_LONG
Definition: splitc.c:778
#define TK_FLOAT
Definition: splitc.c:769
#define TK_SIGNED
Definition: splitc.c:776
#define TK_ENUM
Definition: splitc.c:772
#define TK_CHAR
Definition: splitc.c:764
#define TK_DOUBLE
Definition: splitc.c:768
#define TK_UNSIGNED
Definition: splitc.c:777
#define TK_UNION
Definition: splitc.c:775

◆ TOKEN_UNDEFINED

#define TOKEN_UNDEFINED   (-1)

The lexer cannot handle the ambiguity between named types and variables without extra-help.

This piece of code is copied from preprocessor/lexer.l.

Definition at line 1551 of file clexer.c.

◆ UINT16_MAX

#define UINT16_MAX   (65535U)

Definition at line 339 of file clexer.c.

◆ UINT32_MAX

#define UINT32_MAX   (4294967295U)

Definition at line 342 of file clexer.c.

◆ UINT8_MAX

#define UINT8_MAX   (255U)

Definition at line 336 of file clexer.c.

◆ unput

#define unput (   c)    yyunput( c, (yytext_ptr) )

Definition at line 459 of file clexer.c.

◆ YY_AT_BOL

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 600 of file clexer.c.

◆ YY_BREAK

#define YY_BREAK   /**INTED*/break;

Code executed at the end of each rule.

Definition at line 1817 of file clexer.c.

◆ YY_BUF_SIZE

#define YY_BUF_SIZE   16384

Size of default input buffer.

Definition at line 398 of file clexer.c.

◆ YY_BUFFER_EOF_PENDING

#define YY_BUFFER_EOF_PENDING   2

When an EOF's been seen but there's still some text to process then we mark the buffer as YY_EOF_PENDING, to indicate that we shouldn't try reading from the input source any more.

We might still have a bunch of tokens to match, though, because of possible backing-up.

When we actually see the EOF, we change the status to "new" (via yyrestart()), so that the user can continue scanning by just pointing yyin at a new input file.

Definition at line 521 of file clexer.c.

◆ YY_BUFFER_NEW

#define YY_BUFFER_NEW   0

Definition at line 509 of file clexer.c.

◆ YY_BUFFER_NORMAL

#define YY_BUFFER_NORMAL   1

Definition at line 510 of file clexer.c.

◆ yy_create_buffer

#define yy_create_buffer   c__create_buffer

A lexical scanner generated by flex.

Definition at line 8 of file clexer.c.

◆ YY_CURRENT_BUFFER

#define YY_CURRENT_BUFFER
Value:
: NULL)
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
Definition: clexer.c:529
static size_t yy_buffer_stack_top
!YY_STRUCT_YY_BUFFER_STATE
Definition: clexer.c:527

We provide macros for accessing buffer states in case in the future we want to put the buffer states in a more general "scanner state".

Returns the top of the stack, or NULL.

Definition at line 537 of file clexer.c.

◆ YY_CURRENT_BUFFER_LVALUE

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Same as previous macro, but useful when we know that the buffer stack is not NULL or when we need an lvalue.

For internal use only.

Definition at line 543 of file clexer.c.

◆ YY_DECL

#define YY_DECL   int yylex (void)

Definition at line 1805 of file clexer.c.

◆ YY_DECL_IS_OURS

#define YY_DECL_IS_OURS   1

end tables serialization structures and prototypes

Default declaration of generated scanner - a define so the user can easily add parameters.

Definition at line 1801 of file clexer.c.

◆ yy_delete_buffer

#define yy_delete_buffer   c__delete_buffer

Definition at line 9 of file clexer.c.

◆ YY_DO_BEFORE_ACTION

#define YY_DO_BEFORE_ACTION
Value:
yyleng = (int) (yy_cp - yy_bp); \
*yy_cp = '\0'; \
void const char const char const int
static char yy_hold_char
yy_hold_char holds the character lost when yytext is formed.
Definition: clexer.c:546
char * yy_cp
Definition: clexer.c:1831
#define yytext_ptr
Definition: clexer.c:616
char * yy_bp
Definition: clexer.c:1831
static char * yy_c_buf_p
Points to current character in buffer.
Definition: clexer.c:551

Done after the current pattern has been matched and before the corresponding action - sets up yytext.

Definition at line 626 of file clexer.c.

◆ YY_END_OF_BUFFER

#define YY_END_OF_BUFFER   74

Definition at line 633 of file clexer.c.

◆ YY_END_OF_BUFFER_CHAR

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 387 of file clexer.c.

◆ YY_EXIT_FAILURE

#define YY_EXIT_FAILURE   2

◆ YY_EXTRA_TYPE

#define YY_EXTRA_TYPE   void *

Special case for "unistd.h", since it is non-ANSI.

We include it way down here because we want the user's section 1 to have been scanned first. The user has a chance to override it with an option.

Definition at line 1656 of file clexer.c.

◆ YY_FATAL_ERROR

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Report a fatal error.

Definition at line 1792 of file clexer.c.

◆ yy_flex_debug

#define yy_flex_debug   c__flex_debug

Definition at line 20 of file clexer.c.

◆ YY_FLEX_MAJOR_VERSION

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 34 of file clexer.c.

◆ YY_FLEX_MINOR_VERSION

#define YY_FLEX_MINOR_VERSION   6

Definition at line 35 of file clexer.c.

◆ YY_FLEX_SUBMINOR_VERSION

#define YY_FLEX_SUBMINOR_VERSION   4

Definition at line 36 of file clexer.c.

◆ yy_flush_buffer

#define yy_flush_buffer   c__flush_buffer

Definition at line 14 of file clexer.c.

◆ YY_FLUSH_BUFFER

#define YY_FLUSH_BUFFER   yy_flush_buffer( YY_CURRENT_BUFFER )

Definition at line 571 of file clexer.c.

◆ yy_init_buffer

#define yy_init_buffer   c__init_buffer

Definition at line 13 of file clexer.c.

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(yyin); \
} \
}\
\
#define YY_CURRENT_BUFFER_LVALUE
Same as previous macro, but useful when we know that the buffer stack is not NULL or when we need an ...
Definition: clexer.c:543
#define yyin
Definition: clexer.c:21
size_t yy_size_t
Definition: genread_lex.c:413
static char buf[BSZ]
Definition: split_file.c:157

Gets input and stuffs it into "buf".

number of characters read, or YY_NULL, is returned in "result".

Definition at line 1745 of file clexer.c.

◆ YY_INT_ALIGNED

#define YY_INT_ALIGNED   short int

Definition at line 4 of file clexer.c.

◆ YY_LESS_LINENO

#define YY_LESS_LINENO (   n)
Value:
do { \
int yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\
}while(0)
#define yytext
Definition: clexer.c:27
#define yylineno
Definition: clexer.c:24
#define yyleng
Definition: clexer.c:22

Note: We specifically omit the test for yy_rule_can_match_eol because it requires access to the local variable yy_act.

Since yyless() is a macro, it would break existing scanners that call yyless() from OUTSIDE yylex. One obvious solution it to make yy_act a global. I tried that, and saw a 5% performance hit in a non-yylineno scanner, because yy_act is normally declared as a register variable– so it is not worth it.

Definition at line 431 of file clexer.c.

◆ YY_LINENO_REWIND_TO

#define YY_LINENO_REWIND_TO (   dst)
Value:
do {\
const char *p;\
for ( p = yy_cp-1; p >= (dst); --p)\
if ( *p == '\n' )\
}while(0)

Definition at line 438 of file clexer.c.

◆ yy_load_buffer_state

#define yy_load_buffer_state (   void)    c__load_buffer_state

Definition at line 15 of file clexer.c.

Referenced by if().

◆ YY_MORE_ADJ

#define YY_MORE_ADJ   0

Definition at line 1026 of file clexer.c.

◆ yy_new_buffer

#define yy_new_buffer   yy_create_buffer

Definition at line 581 of file clexer.c.

◆ YY_NEW_FILE

#define YY_NEW_FILE   yyrestart( yyin )

Special action meaning "start processing a new file".

Definition at line 386 of file clexer.c.

◆ YY_NO_INPUT

#define YY_NO_INPUT   1
Id
clex.l 23412 2017-08-09 15:07:09Z irigoin

Definition at line 1081 of file clexer.c.

◆ YY_NULL

#define YY_NULL   0

Returned upon end-of-file.

Definition at line 365 of file clexer.c.

◆ YY_NUM_RULES

#define YY_NUM_RULES   73

Definition at line 632 of file clexer.c.

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

Amount of stuff to slurp up with each read.

Definition at line 1729 of file clexer.c.

◆ YY_RESTORE_YY_MORE_OFFSET

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 1027 of file clexer.c.

◆ YY_RULE_SETUP

#define YY_RULE_SETUP
Value:
if ( yyleng > 0 ) \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
(yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION

Definition at line 1820 of file clexer.c.

◆ YY_SC_TO_UI

#define YY_SC_TO_UI (   c)    ((YY_CHAR) (c))

Promotes a possibly negative, possibly signed char to an integer in range [0..255] for use as an array index.

Definition at line 370 of file clexer.c.

◆ yy_scan_buffer

#define yy_scan_buffer   c__scan_buffer

Definition at line 10 of file clexer.c.

◆ yy_scan_bytes

#define yy_scan_bytes   c__scan_bytes

Definition at line 12 of file clexer.c.

◆ yy_scan_string

#define yy_scan_string   c__scan_string

Definition at line 11 of file clexer.c.

◆ yy_set_bol

#define yy_set_bol (   at_bol)
Value:
{ \
if ( ! YY_CURRENT_BUFFER ){\
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_CURRENT_BUFFER
We provide macros for accessing buffer states in case in the future we want to put the buffer states ...
Definition: clexer.c:537
#define YY_BUF_SIZE
Size of default input buffer.
Definition: clexer.c:398

Definition at line 591 of file clexer.c.

◆ yy_set_interactive

#define yy_set_interactive (   is_interactive)
Value:
{ \
if ( ! YY_CURRENT_BUFFER ){ \
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}

Definition at line 582 of file clexer.c.

◆ YY_START

#define YY_START   (((yy_start) - 1) / 2)

Translate the current start state into a value that can be later handed to BEGIN to return to the state.

The YYSTATE alias is for lex compatibility.

Definition at line 381 of file clexer.c.

◆ YY_START_STACK_INCR

#define YY_START_STACK_INCR   25

Number of entries by which start-condition stack grows.

Definition at line 1787 of file clexer.c.

◆ YY_STATE_BUF_SIZE

#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

ia64

The state buf must be large enough to hold one state per character in the main buffer.

Definition at line 404 of file clexer.c.

◆ YY_STATE_EOF

#define YY_STATE_EOF (   state)    (YY_END_OF_BUFFER + state + 1)

Action number for EOF rule of a given start state.

Definition at line 384 of file clexer.c.

◆ YY_STRUCT_YY_BUFFER_STATE

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 462 of file clexer.c.

◆ yy_switch_to_buffer

#define yy_switch_to_buffer   c__switch_to_buffer

Definition at line 16 of file clexer.c.

◆ YY_TYPEDEF_YY_BUFFER_STATE

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 407 of file clexer.c.

◆ YY_TYPEDEF_YY_SIZE_T

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 412 of file clexer.c.

◆ YY_USER_ACTION

#define YY_USER_ACTION

!YY_DECL

Code executed at the beginning of each rule, after yytext and yyleng have been set up.

Definition at line 1812 of file clexer.c.

◆ yyalloc

#define yyalloc   c_alloc

Definition at line 29 of file clexer.c.

◆ yyconst

#define yyconst   const

! C99

! FLEXINT_H begin standard C++ headers. TODO: this is always defined, so inline it

Definition at line 356 of file clexer.c.

◆ yyensure_buffer_stack

#define yyensure_buffer_stack (   void)    c_ensure_buffer_stack

Definition at line 19 of file clexer.c.

Referenced by if().

◆ yyfree

#define yyfree   c_free

Definition at line 31 of file clexer.c.

◆ yyget_debug

#define yyget_debug (   void)    c_get_debug

Definition at line 146 of file clexer.c.

◆ yyget_extra

#define yyget_extra (   void)    c_get_extra

Definition at line 158 of file clexer.c.

◆ yyget_in

#define yyget_in (   void)    c_get_in

Definition at line 170 of file clexer.c.

◆ yyget_leng

#define yyget_leng (   void)    c_get_leng

Definition at line 194 of file clexer.c.

◆ yyget_lineno

#define yyget_lineno (   void)    c_get_lineno

Definition at line 206 of file clexer.c.

◆ yyget_out

#define yyget_out (   void)    c_get_out

Definition at line 182 of file clexer.c.

◆ yyget_text

#define yyget_text (   void)    c_get_text

Definition at line 200 of file clexer.c.

◆ yyin

#define yyin   c_in

Definition at line 21 of file clexer.c.

◆ yyleng

#define yyleng   c_leng

Definition at line 22 of file clexer.c.

◆ yyless [1/2]

#define yyless (   n)
Value:
do \
{ \
/**Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /**set up yytext again */ \
} \
while ( 0 )
#define YY_MORE_ADJ
Definition: clexer.c:1026

Return all but the first "n" matched characters back to the input stream.

Definition at line 447 of file clexer.c.

◆ yyless [2/2]

#define yyless (   n)
Value:
do \
{ \
/**Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
yytext[yyleng] = (yy_hold_char); \
(yy_c_buf_p) = yytext + yyless_macro_arg; \
*(yy_c_buf_p) = '\0'; \
yyleng = yyless_macro_arg; \
} \
while ( 0 )

Return all but the first "n" matched characters back to the input stream.

Definition at line 447 of file clexer.c.

◆ yylex

#define yylex (   void)    c_lex

Definition at line 23 of file clexer.c.

◆ yylex_destroy

#define yylex_destroy (   void)    c_lex_destroy

Accessor methods to globals.

These are made visible to non-reentrant scanners for convenience.

Definition at line 140 of file clexer.c.

◆ yylex_init

#define yylex_init   c_lex_init

Definition at line 128 of file clexer.c.

◆ yylex_init_extra

#define yylex_init_extra   c_lex_init_extra

Definition at line 134 of file clexer.c.

◆ yylineno

#define yylineno   c_lineno

Definition at line 24 of file clexer.c.

◆ yymore

#define yymore ( )    yymore_used_but_not_detected

Definition at line 1025 of file clexer.c.

◆ yynoreturn

#define yynoreturn

Definition at line 361 of file clexer.c.

◆ yyout

#define yyout   c_out

Definition at line 25 of file clexer.c.

◆ yypop_buffer_state

#define yypop_buffer_state (   void)    c_pop_buffer_state

Definition at line 18 of file clexer.c.

◆ yypush_buffer_state

#define yypush_buffer_state   c_push_buffer_state

Definition at line 17 of file clexer.c.

◆ yyrealloc

#define yyrealloc   c_realloc

Definition at line 30 of file clexer.c.

◆ yyrestart

#define yyrestart   c_restart

Definition at line 26 of file clexer.c.

◆ yyset_debug

#define yyset_debug   c_set_debug

Definition at line 152 of file clexer.c.

◆ yyset_extra

#define yyset_extra   c_set_extra

Definition at line 164 of file clexer.c.

◆ yyset_in

#define yyset_in   c_set_in

Definition at line 176 of file clexer.c.

◆ yyset_lineno

#define yyset_lineno   c_set_lineno

Definition at line 212 of file clexer.c.

◆ yyset_out

#define yyset_out   c_set_out

Definition at line 188 of file clexer.c.

◆ YYSTATE

#define YYSTATE   YY_START

Definition at line 382 of file clexer.c.

◆ YYTABLES_NAME

#define YYTABLES_NAME   "yytables"

◆ yyterminate

#define yyterminate ( )    return YY_NULL

No semi-colon after return; correct usage is to write "yyterminate();" - we don't want an extra ';' after the "return" because that will cause some compilers to complain about unreachable statements.

Definition at line 1782 of file clexer.c.

◆ yytext

#define yytext   c_text

Definition at line 27 of file clexer.c.

◆ yytext_ptr

#define yytext_ptr   yytext

Definition at line 616 of file clexer.c.

◆ yywrap

#define yywrap (   void)    c_wrap

Macros after this point can all be overridden by user definitions in section 1.

Definition at line 28 of file clexer.c.

Typedef Documentation

◆ flex_int16_t

typedef short int flex_int16_t

Definition at line 310 of file clexer.c.

◆ flex_int32_t

typedef int flex_int32_t

Definition at line 311 of file clexer.c.

◆ flex_int8_t

typedef signed char flex_int8_t

C99 systems have <inttypes.h>.

Non-C99 systems may or may not.

Definition at line 309 of file clexer.c.

◆ flex_uint16_t

typedef unsigned short int flex_uint16_t

Definition at line 313 of file clexer.c.

◆ flex_uint32_t

typedef unsigned int flex_uint32_t

Definition at line 314 of file clexer.c.

◆ flex_uint8_t

typedef unsigned char flex_uint8_t

Definition at line 312 of file clexer.c.

◆ YY_BUFFER_STATE

Definition at line 408 of file clexer.c.

◆ YY_CHAR

Begin user sect3.

Definition at line 603 of file clexer.c.

◆ yy_size_t

typedef size_t yy_size_t

Definition at line 413 of file clexer.c.

◆ yy_state_type

typedef int yy_state_type

Definition at line 607 of file clexer.c.

Function Documentation

◆ bsd_rewrite()

static void bsd_rewrite ( char **  pyytext)
static

compatibility layer for BSD

Definition at line 1527 of file clexer.c.

1527  {
1528  char* aliases [][2] = {
1529  { "__stdinp", "stdin" },
1530  { "__stdoutp", "stdout" },
1531  { "__stderrp", "stderr" },
1532  { "__isnanl", "isnanl" },
1533  { "__isnanf", "isnanf" },
1534  { "__isnan", "isnan" },
1535  { NULL, NULL }
1536  };
1537  for(char *(*iter)[2] = &aliases[0] ; (*iter)[0] ; ++iter) {
1538  if(same_string_p(*pyytext, (*iter)[0] )) {
1539  *pyytext=(*iter)[1];
1540  break;
1541  }
1542  }
1543 }
static hash_table aliases
Definition: gtk_props.c:69
#define same_string_p(s1, s2)

References aliases, and same_string_p.

◆ character_occurences_in_string()

unsigned int character_occurences_in_string ( string  s,
char  c 
)

Use a stack to survive to file inclusions if any.

I guess that it is currently not used since file inclusion is already done by the preprocessor... RK To track the absolute line number in the file that is parsed use the default flex yylineno that is renamed c_lineno here Use a stack to survive to file inclusions if any Count the number of c in s.

Definition at line 1133 of file clexer.c.

1134 {
1135  string p = string_undefined;
1136  unsigned int count = 0;
1137 
1138  for(p=s; *p!='\0'; p++) {
1139  count += (*p==c)? 1 : 0 ;
1140  }
1141  return count;
1142 }
static int count
Definition: SDG.c:519
#define string_undefined
Definition: newgen_types.h:40

References count, and string_undefined.

Referenced by discard_C_comment().

+ Here is the caller graph for this function:

◆ clear_C_comment()

void clear_C_comment ( void  )

Comments in the compilation unit and outside of function bodies are lost because they are related only to declarations and because comments on declarations are lost.

Definition at line 1489 of file clexer.c.

1490 {
1494  }
1495  /* Comments in the compilation unit and outside of function bodies
1496  are lost because they are related only to
1497  declarations and because comments on declarations are lost.*/
1498  if(!comments_empty_p()) {
1499  int count = 0;
1500  pips_debug(3, "Comments stack is not empty:\n");
1501  while(!comments_empty_p()) {
1502  string c = comments_pop();
1503  count++;
1504  pips_debug(3, "Element %d: \"%s\"\n",
1505  count, string_undefined_p(c) ? "string undefined" : c);
1506  if(!string_undefined_p(c))
1507  free(c);
1508  }
1509  }
1510  pips_assert("The comment stack is empty\n", comments_empty_p());
1511 }
static string C_current_comment
Comment management:
Definition: clexer.c:1266
void free(void *)
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define string_undefined_p(s)
Definition: newgen_types.h:41

References C_current_comment, count, free(), pips_assert, pips_debug, string_undefined, and string_undefined_p.

Referenced by error_reset_C_comment(), and reset_C_comment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ discard_C_comment()

void discard_C_comment ( void  )

Discard a C comment because we don't know how to deal with it.

The comments are only made of '
', just silently discarding them

Definition at line 1426 of file clexer.c.

1427 {
1430  == strlen(C_current_comment)) {
1431  /* The comments are only made of '\n', just silently discarding them */
1432  pips_debug(3,"The \\n are lost, so the code presentation may be wrong...\n");
1433  }
1434  else {
1435  /*
1436  pips_user_warning("Comment \"%s\" is lost at line %d, "
1437  "probably because comments cannot be attached to declarations.\n",
1438  C_current_comment, C_line_number);
1439  */
1440  pips_debug(8, "Comment \"%s\" is lost at line %d, "
1441  "probably because comments cannot be attached to declarations.\n",
1443  }
1446  }
1447 }
static int C_line_number
To track the user line number, that is the one in the original user file.
Definition: clexer.c:1102
unsigned int character_occurences_in_string(string s, char c)
Use a stack to survive to file inclusions if any.
Definition: clexer.c:1133

References C_current_comment, C_line_number, character_occurences_in_string(), free(), pips_debug, string_undefined, and string_undefined_p.

Referenced by MakeBlock().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ error_reset_C_comment()

void error_reset_C_comment ( bool is_compilation_unit_p   __attribute__(__unused__))

Definition at line 1477 of file clexer.c.

1478 {
1482  }
1483  clear_C_comment();
1484  free_comments_stack();
1485  bracket_depth = -1;
1486  token_has_been_seen_p = false;
1487 }
static int bracket_depth
Definition: clexer.c:1274
void clear_C_comment()
Definition: clexer.c:1489

References bracket_depth, C_current_comment, clear_C_comment(), free(), string_undefined, string_undefined_p, and token_has_been_seen_p.

+ Here is the call graph for this function:

◆ error_reset_current_C_line_number()

void error_reset_current_C_line_number ( void  )

Definition at line 1224 of file clexer.c.

1225 {
1230 
1231  free_line_number_stack();
1232  free_absolute_line_number_stack();
1233 }
#define UNDEFINED_C_LINE_NUMBER
#define FIRST_C_LINE_NUMBER
Error handling.
int c_lineno
the file read in by the c_lexer
Definition: c_syntax.h:293
static int previous_C_line_number
Definition: clexer.c:1144
static int previous_c_lineno
To keep track of line intervals.
Definition: clexer.c:1113

References C_line_number, c_lineno, FIRST_C_LINE_NUMBER, previous_C_line_number, previous_c_lineno, and UNDEFINED_C_LINE_NUMBER.

Referenced by c_parser_error().

+ Here is the caller graph for this function:

◆ get_current_C_comment()

string get_current_C_comment ( void  )

Return the current comment as a string to be freed by the caller and reset the current comment.

If the current comment is undefined, returns a copy of the empty string, "".

Reset also the current comment.

If the comment begins with a new-line, it is indeed the new-line that ends the previous statement, so skip it. Quicker than strlen()

  • memmove():

Note there won't be a memory leak since the orginal '\0' is in the malloc() bloc to be free()ed anyway...

If the comment is only an empty one, do not retain it:

Do retain it to keep the statement data structure easy to use, allowing strdup() on its text fields

Remove the trailing new-line if any since the RI is already line-oriented at the comment level: This is already done above.

It is a trailing new-line: just get rid of it:

pips_debug(3, "get_current_C_comment comment \"s"
", cc);

Definition at line 1282 of file clexer.c.

1283 {
1284  string cc = C_current_comment;
1286  if (cc != string_undefined) {
1287  if (cc[0] == '\n') {
1288  /* If the comment begins with a new-line, it is indeed the new-line
1289  that ends the previous statement, so skip it. Quicker than strlen()
1290  + memmove(): */
1291  char * p = &cc[0];
1292  do {
1293  p[0] = p[1];
1294  }
1295  while (*p++ != '\0');
1296  /* Note there won't be a memory leak since the orginal '\0' is in the
1297  malloc() bloc to be free()ed anyway... */
1298  }
1299  /* If the comment is only an empty one, do not retain it: */
1300  if (cc[0] == '\0') {
1301  /* Do retain it to keep the statement data structure easy to use, allowing strdup() on its text fields */
1302  //free(cc);
1303  //cc = string_undefined;
1304  ;
1305  }
1306  else {
1307  /* Remove the trailing new-line if any since the RI is already
1308  line-oriented at the comment level: This is already done above. */
1309  char * last_newline = strrchr(cc, '\n');
1310  if (last_newline != NULL && last_newline[1] == '\0') {
1311  /* It is a trailing new-line: just get rid of it: */
1312  //last_newline[0] = '\0';
1313  ;
1314  }
1315  }
1316  }
1317  else
1318  cc = strdup("");
1319  /* pips_debug(3, "get_current_C_comment comment \"%s\"\n",
1320  cc); */
1321  // Too early
1322  // token_has_been_seen_p = false;
1323  return cc;
1324 }
char * strdup()

References C_current_comment, strdup(), and string_undefined.

Referenced by ExpressionToStatement(), MakeCaseStatement(), MakeDefaultStatement(), MakeGotoStatement(), and push_current_C_comment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_current_C_line_number()

int get_current_C_line_number ( void  )

FI: I assume that get_current_C_line_number is called only by some kind of make_statement()

The PIPS preprocessed C function files contain a specific first line to convert the line number in the workspace unto a line number in the user source file.

Definition at line 1146 of file clexer.c.

1147 {
1148  /* FI: I assume that get_current_C_line_number is called only
1149  * by some kind of make_statement()
1150  *
1151  * The PIPS preprocessed C function files contain a specific first line
1152  * to convert the line number in the workspace unto a line number in the
1153  * user source file.
1154  */
1157  return C_line_number;
1158 }

References C_line_number, c_lineno, previous_C_line_number, and previous_c_lineno.

Referenced by c_parser_error(), c_parser_user_warning_alist(), ExpressionToStatement(), FindEntityFromLocalNameAndPrefix(), MakeForloop(), MakeGotoStatement(), MakeWhileLoop(), pop_current_C_comment(), push_current_C_comment(), and push_current_C_line_number().

+ Here is the caller graph for this function:

◆ get_previous_C_line_number()

int get_previous_C_line_number ( void  )

Should be called just before get_current_C_line_number.

Definition at line 1161 of file clexer.c.

1162 {
1163  return previous_C_line_number;
1164 }

References previous_C_line_number.

Referenced by c_parser_user_warning_alist().

+ Here is the caller graph for this function:

◆ get_previous_c_lineno()

int get_previous_c_lineno ( void  )

Definition at line 1115 of file clexer.c.

1116 {
1117  return previous_c_lineno;
1118 }

References previous_c_lineno.

Referenced by c_parser_user_warning_alist().

+ Here is the caller graph for this function:

◆ if()

if ( yy_init)

first start state

Definition at line 1834 of file clexer.c.

1835  {
1836  (yy_init) = 1;
1837 
1838 #ifdef YY_USER_INIT
1839  YY_USER_INIT;
1840 #endif
1841 
1842  if ( ! (yy_start) )
1843  (yy_start) = 1; /* first start state */
1844 
1845  if ( ! yyin )
1846  yyin = stdin;
1847 
1848  if ( ! yyout )
1849  yyout = stdout;
1850 
1851  if ( ! YY_CURRENT_BUFFER ) {
1855  }
1856 
1858  }
#define yy_load_buffer_state
Definition: clexer.c:15
static int yy_start
whether we need to initialize
Definition: clexer.c:553
#define yyout
Definition: clexer.c:25
#define yyensure_buffer_stack
Definition: clexer.c:19
#define yy_create_buffer
A lexical scanner generated by flex.
Definition: clexer.c:8
static int yy_init
Definition: clexer.c:552

References YY_BUF_SIZE, yy_create_buffer, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_init, yy_load_buffer_state, yy_start, yyensure_buffer_stack, yyin, and yyout.

◆ init_C_comment()

void init_C_comment ( void  )

Definition at line 1513 of file clexer.c.

1514 {
1515  bracket_depth = 0;
1517  pips_internal_error("Missing reset for C_current_comment");
1518  }
1519  if(!stack_undefined_p(comments_stack) && !STACK_NULL_P(comments_stack) && !comments_empty_p()) {
1520  pips_internal_error("Comment stack is not empty");
1521  }
1522  make_comments_stack();
1523  token_has_been_seen_p = false;
1524 }
#define pips_internal_error
Definition: misc-local.h:149
#define STACK_NULL_P(s)
Definition: newgen_stack.h:53
#define stack_undefined_p(s)
Definition: newgen_stack.h:56

References bracket_depth, C_current_comment, pips_internal_error, STACK_NULL_P, stack_undefined_p, string_undefined_p, and token_has_been_seen_p.

Referenced by actual_c_parser().

+ Here is the caller graph for this function:

◆ is_c_parser_keyword_typedef()

static int is_c_parser_keyword_typedef ( char *  id)
static

See if id is a keyword, a typedef or an identifier.

Returns the token number for keywords and typedefs. Returns 0 for variable identifiers.

The new typedefs are stored by c_parser_put_new_typedef().

No need to bother for scopes when dealing with C keywords, but do not take into account top-level typedefs which may be masked.

Check again for a global typedef

Definition at line 1573 of file clexer.c.

1574 {
1575  token_has_been_seen_p = true;
1576  /* No need to bother for scopes when dealing with C keywords,
1577  * but do not take into account top-level typedefs which may be masked.
1578  */
1579  int t = is_c_keyword_typedef(id);
1580  if(t==0 || t==TK_NAMED_TYPE) {
1581  // id may be a keyword, but scopes must be used
1582  //string sn = get_preprocessor_current_scope();
1583  string sn = get_c_parser_current_scope();
1584  string scoped_id = strdup(concatenate(id, "%", sn, NULL));
1585  t = is_c_keyword_typedef(scoped_id);
1586  free(scoped_id);
1587  if(t == 0) {
1588  // int i, n = preprocessor_scope_number();
1589  int i, n = c_parser_number_of_scopes();
1590  for(i=2; i<=n && t==0; i++) {
1591  // sn = get_preprocessor_nth_scope(i);
1592  sn = get_c_parser_nth_scope(i);
1593  scoped_id = strdup(concatenate(id, "%", sn, NULL));
1594  t = is_c_keyword_typedef(scoped_id);
1595  ifdebug(1) {
1596  if(t==TK_NAMED_TYPE)
1597  fprintf(stderr, "Token \"%s\" identified as TK_NAMED_TYPE.\n",
1598  scoped_id);
1599  }
1600  free(scoped_id);
1601  }
1602  /* Check again for a global typedef */
1603  t = is_c_keyword_typedef(id);
1604  }
1605  }
1606 #define TK_TYPE_P(tk) \
1607  ((tk)==TK_CHAR || (tk)==TK_INT || \
1608  (tk)==TK_DOUBLE || (tk)==TK_FLOAT || (tk)==TK_COMPLEX || \
1609  (tk)==TK_ENUM || (tk)==TK_STRUCT || (tk)==TK_UNION || \
1610  (tk)==TK_SIGNED|| (tk)==TK_UNSIGNED|| (tk)==TK_LONG|| (tk)==TK_SHORT ||\
1611  (tk)==TK_RETURN)
1612  if(t==TK_NAMED_TYPE
1615  //if(penultimate_keyword_token!=TK_TYPEDEF) {
1616  // Identifier
1617  t = 0;
1618  pips_debug(1, "Token \"%s\" is in fact assumed to be an identifier.\n",
1619  id);
1620  //}
1621  }
1622  if(t==TK_STATIC && bracket_depth>0)
1623  t = TK_STATIC_DIMENSION;
1625  pips_debug(5, "Token \"%s\" is assumed to be %d.\n", id, t);
1626  return t;
1627 }
string get_c_parser_current_scope(void)
Definition: cyacc.tab.c:569
string get_c_parser_nth_scope(int)
Definition: cyacc.tab.c:581
int c_parser_number_of_scopes(void)
Definition: cyacc.tab.c:587
#define TK_TYPE_P(tk)
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
_int is_c_keyword_typedef(char *)
This function checks if s is a C keyword or typedef name and returns the token number thanks to the h...
Definition: static.c:297
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
#define ifdebug(n)
Definition: sg.c:47
#define TK_STATIC
Definition: splitc.c:782
#define TK_STATIC_DIMENSION
Definition: splitc.c:788
#define TK_NAMED_TYPE
Definition: splitc.c:760

References bracket_depth, c_parser_number_of_scopes(), concatenate(), fprintf(), free(), get_c_parser_current_scope(), get_c_parser_nth_scope(), ifdebug, is_c_keyword_typedef(), pips_debug, previous_keyword_token, strdup(), TK_NAMED_TYPE, TK_STATIC, TK_STATIC_DIMENSION, TK_TYPE_P, and token_has_been_seen_p.

+ Here is the call graph for this function:

◆ pop_current_C_comment()

string pop_current_C_comment ( void  )

Pop the current comment.

Returns
the previous current comment.

This is typically used at the end of a statement to be built.

Note this do not set the current comment. Strange API...

Definition at line 1352 of file clexer.c.

1353 {
1354  string cc = comments_pop();
1355  if (string_undefined_p(cc))
1356  pips_debug(3, "empty comment popped at line %d\n",
1358  else
1359  pips_debug(3, "comment \"%s\" popped at line %d\n", cc,
1361  return cc;
1362 }
int get_current_C_line_number(void)
Definition: clexer.c:1146

References get_current_C_line_number(), pips_debug, and string_undefined_p.

Referenced by MakeForloop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_current_C_line_number()

int pop_current_C_line_number ( void  )

Definition at line 1202 of file clexer.c.

1203 {
1204  int ln = line_number_pop();
1205  c_lineno = absolute_line_number_pop();
1206 
1207  return ln;
1208 }

References c_lineno.

Referenced by MakeForloop().

+ Here is the caller graph for this function:

◆ push_current_C_comment()

void push_current_C_comment ( void  )

Push the current C comment so that we can get it back when building the statement later.

This reset the current comment through get_current_C_comment()

Definition at line 1331 of file clexer.c.

1332 {
1333  string cc = get_current_C_comment();
1334 
1335  if (string_undefined_p(cc))
1336  pips_debug(3, "empty comment pushed at line %d\n",
1338  else
1339  pips_debug(3, "comment \"%s\" pushed at line %d\n", cc,
1341  comments_push(cc);
1342 }
string get_current_C_comment(void)
Return the current comment as a string to be freed by the caller and reset the current comment.
Definition: clexer.c:1282

References get_current_C_comment(), get_current_C_line_number(), pips_debug, and string_undefined_p.

+ Here is the call graph for this function:

◆ push_current_C_line_number()

void push_current_C_line_number ( void  )

The line number stack, designed for structured control structure, is not used yet.

Definition at line 1194 of file clexer.c.

1195 {
1196  int ln = get_current_C_line_number();
1197 
1198  line_number_push(ln);
1199  absolute_line_number_push(c_lineno);
1200 }

References c_lineno, and get_current_C_line_number().

+ Here is the call graph for this function:

◆ remove_LFs_from_C_comment()

void remove_LFs_from_C_comment ( int  extra_LF)

Remove "extra_LF" trailing LF from C_current_comment if they can be found at the end of the comment string.


Parameters
extra_LFxtra_LF

Definition at line 1398 of file clexer.c.

1399 {
1401  int l = strlen(C_current_comment);
1402  int c = 0;
1403  char * p = C_current_comment+l-1;
1404  pips_debug(3,"begin: %s\n", C_current_comment);
1405  // pips_assert("The comment string is longer than the number of LF to remove\n",
1406  // extra_LF<=l);
1407  if(extra_LF<=l) {
1408  while(c<extra_LF && *p=='\n') {
1409  c++;
1410  *p = '\000';
1411  p--;
1412  }
1413  if(c==extra_LF) { // We are fine
1414  ;
1415  }
1416  else {
1417  // Should be a pips_internal_warning()
1418  pips_user_warning("%d extraneous LF left in comment\n", extra_LF-c);
1419  }
1420  }
1421  pips_debug(3,"end: %s\n", C_current_comment);
1422  }
1423 }
#define pips_user_warning
Definition: misc-local.h:146

References C_current_comment, pips_debug, pips_user_warning, string_undefined, and token_has_been_seen_p.

Referenced by analyze_preprocessor_line().

+ Here is the caller graph for this function:

◆ reset_C_comment()

void reset_C_comment ( bool  is_compilation_unit_p)

reset and reset_error should be handled differently

Comments in the compilation unit are lost because they are related only to declarations and because comments on declarations are lost. Also, comments located at the end of a block are lost, as we do not generate an extra NOP to carry them.

pips_internal_error("Comments stack is not empty\n");

Parameters
is_compilation_unit_ps_compilation_unit_p

Definition at line 1450 of file clexer.c.

1451 {
1455  }
1456  /* Comments in the compilation unit are lost because they are related only to
1457  declarations and because comments on declarations are lost. Also, comments
1458  located at the end of a block are lost, as we do not generate an extra NOP to carry them. */
1459  if(!is_compilation_unit_p && !comments_empty_p()) {
1460  int count = 0;
1461  pips_user_warning("Comments stack is not empty (only meaningful comments are shown):\n");
1462  while(!comments_empty_p()) {
1463  string c = comments_pop();
1464  count++;
1465  if(strcmp(c, "\n")!=0)
1466  fprintf(stderr, "Element %d: \"%s\"\n", count, c);
1467  free(c);
1468  }
1469  /* pips_internal_error("Comments stack is not empty\n"); */
1470  }
1471  clear_C_comment();
1472  free_comments_stack();
1473  bracket_depth = -1;
1474  token_has_been_seen_p = false;
1475 }

References bracket_depth, C_current_comment, clear_C_comment(), count, fprintf(), free(), pips_user_warning, string_undefined, string_undefined_p, and token_has_been_seen_p.

Referenced by actual_c_parser(), and c_parser_error().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_current_C_line_number()

void reset_current_C_line_number ( void  )

Definition at line 1210 of file clexer.c.

1211 {
1216 
1217  if(!line_number_empty_p()) {
1218  pips_internal_error("Line number stack is not empty\n");
1219  }
1220  free_line_number_stack();
1221  free_absolute_line_number_stack();
1222 }

References C_line_number, c_lineno, FIRST_C_LINE_NUMBER, pips_internal_error, previous_C_line_number, previous_c_lineno, and UNDEFINED_C_LINE_NUMBER.

Referenced by actual_c_parser().

+ Here is the caller graph for this function:

◆ reset_token_has_been_seen_p()

void reset_token_has_been_seen_p ( void  )

Definition at line 1270 of file clexer.c.

1270 {token_has_been_seen_p = false;}

References token_has_been_seen_p.

◆ set_current_C_line_number()

void set_current_C_line_number ( void  )

Initialize the user line number...

... and the absolute line number in the current file

The first line is used to indicate the line number in the user source file

Some check on it first? It should have been disallocated by reset_current_C_line_number()

Definition at line 1166 of file clexer.c.

1167 {
1169  /* Initialize the user line number... */
1171  // Rely on preprocessor pragma lines, which are not always present
1172  // especially for code synthesized by PIPS...
1173  // C_line_number = UNDEFINED_C_LINE_NUMBER;
1175  /* ... and the absolute line number in the current file */
1177  /* The first line is used to indicate the line number in the user
1178  * source file
1179  */
1181  }
1182  else
1183  pips_internal_error("C_line_number not resetted\n");
1184 
1185  C_line_increment = 1;
1186 
1187  /* Some check on it first? It should have been disallocated by reset_current_C_line_number() */
1188  make_line_number_stack();
1189  make_absolute_line_number_stack();
1190 }
int C_line_increment
The line increment is set to zero when header files are parsed.
Definition: clexer.c:1110

References C_line_increment, C_line_number, c_lineno, FIRST_C_LINE_NUMBER, pips_internal_error, previous_C_line_number, previous_c_lineno, and UNDEFINED_C_LINE_NUMBER.

Referenced by actual_c_parser().

+ Here is the caller graph for this function:

◆ update_C_comment()

void update_C_comment ( string  a_comment)

Add a comment to the current one.

Do not add LFs that appear within a statement

Do not concatenate two comments without a LF

Parameters
a_comment_comment

Definition at line 1365 of file clexer.c.

1366 {
1367  /* Do not add LFs that appear within a statement */
1368  bool is_LF_p = *a_comment=='\n' && *(a_comment+1)=='\000';
1369  if(!(token_has_been_seen_p && a_comment!=NULL
1370  && is_LF_p)) {
1371  string new_comment = string_undefined;
1372  // FI: seems to imply that concatenate accepts string_undefined as an argument...
1374  /* Do not concatenate two comments without a LF */
1375  if(l>0 && *(C_current_comment+l-1)!='\n' && !is_LF_p)
1376  new_comment = strdup(concatenate(C_current_comment, "\n", a_comment, NULL));
1377  else
1378  new_comment = strdup(concatenate(C_current_comment, a_comment, NULL));
1379 
1382  C_current_comment = new_comment;
1383  }
1384  else {
1385  static int c = 0;
1386  c++;
1387  pips_debug(8, "LF ignored: %d\n", c++);
1388  }
1389 
1390  pips_debug(3,"update_C_comment %s\n",
1392  "still undefined" : C_current_comment);
1393 }

References C_current_comment, concatenate(), free(), pips_debug, strdup(), string_undefined, string_undefined_p, and token_has_been_seen_p.

+ Here is the call graph for this function:

◆ yy_create_buffer()

YY_BUFFER_STATE yy_create_buffer ( FILE *  file,
int  size 
)

◆ yy_delete_buffer()

void yy_delete_buffer ( YY_BUFFER_STATE  b)

◆ yy_fatal_error()

static void yynoreturn yy_fatal_error ( const char *  msg)
static

◆ yy_flush_buffer()

void yy_flush_buffer ( YY_BUFFER_STATE  b)

◆ yy_get_next_buffer()

static int yy_get_next_buffer ( void  )
static

◆ yy_get_previous_state()

static yy_state_type yy_get_previous_state ( void  )
static

◆ yy_init_buffer()

static void yy_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
)
static

◆ yy_init_globals()

static int yy_init_globals ( void  )
static

◆ yy_scan_buffer()

YY_BUFFER_STATE yy_scan_buffer ( char *  base,
yy_size_t  size 
)

◆ yy_scan_bytes()

YY_BUFFER_STATE yy_scan_bytes ( const char *  bytes,
int  len 
)

◆ yy_scan_string()

YY_BUFFER_STATE yy_scan_string ( const char *  yy_str)

◆ yy_switch_to_buffer()

void yy_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

◆ yy_try_NUL_trans()

static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state)
static

◆ yyalloc()

void* yyalloc ( yy_size_t  )

◆ yyfree()

void yyfree ( void *  )

◆ yypush_buffer_state()

void yypush_buffer_state ( YY_BUFFER_STATE  new_buffer)

◆ yyrealloc()

void* yyrealloc ( void *  ,
yy_size_t   
)

◆ yyrestart()

void yyrestart ( FILE *  input_file)

◆ yyset_debug()

void yyset_debug ( int  debug_flag)

◆ yyset_extra()

void yyset_extra ( YY_EXTRA_TYPE  user_defined)

◆ yyset_in()

void yyset_in ( FILE *  _in_str)

◆ yyset_lineno()

void yyset_lineno ( int  _line_number)

◆ yyset_out()

void yyset_out ( FILE *  _out_str)

Variable Documentation

◆ bracket_depth

int bracket_depth = -1
static

◆ C_current_comment

string C_current_comment = string_undefined
static

Comment management:

  • comments within declarations are misplaced (because there is no corresponding attachment point)
  • comments for structured control structures such as "for", "switch", "while",... are stacked so that we can get them back when building the statement at the end of the statement;

    "do .... while()" is not handled properly; "else" cannot carry a comment, because the "while" and "else" do not really exist in the RI;

  • the comments for other statements are the current comments
  • end-of-line comments placed after a statement are stored as comment for the next statement
  • end-of-line before comments that can be retained by the C parser are gathered with the comment
  • comments appearing by the end of a block are lost (no NOP statement is generated to carry them yet)
  • linefeed and comments inside a statement are collected as a comment before statement (some weird impact on print-out may occur); same as for declaration statements, but less frequent
  • some comments are still ignored, although available (to be implemented)

Definition at line 1266 of file clexer.c.

Referenced by clear_C_comment(), discard_C_comment(), error_reset_C_comment(), get_current_C_comment(), init_C_comment(), remove_LFs_from_C_comment(), reset_C_comment(), and update_C_comment().

◆ C_line_increment

int C_line_increment = 1

The line increment is set to zero when header files are parsed.

from "clex.l"

The goal is to reconstruct the line number in the user file and not the line number in the preprocessed file.

This is performed in analyze_preprocessor_line() (util.c)

Definition at line 1110 of file clexer.c.

Referenced by analyze_preprocessor_line(), and set_current_C_line_number().

◆ C_line_number

int C_line_number = UNDEFINED_C_LINE_NUMBER
static

To track the user line number, that is the one in the original user file.

Definition at line 1102 of file clexer.c.

Referenced by analyze_preprocessor_line(), discard_C_comment(), error_reset_current_C_line_number(), get_current_C_line_number(), reset_current_C_line_number(), and set_current_C_line_number().

◆ previous_C_line_number

◆ previous_c_lineno

int previous_c_lineno = UNDEFINED_C_LINE_NUMBER
static

◆ previous_keyword_token

int previous_keyword_token = TOKEN_UNDEFINED
static

Definition at line 1552 of file clexer.c.

Referenced by is_c_parser_keyword_typedef().

◆ token_has_been_seen_p

bool token_has_been_seen_p = false
static

To see if comments are collected within a statement or outside it is pretty easy to turn it on.

It is more difficult to turn it off.

Definition at line 1268 of file clexer.c.

Referenced by error_reset_C_comment(), init_C_comment(), is_c_parser_keyword_typedef(), remove_LFs_from_C_comment(), reset_C_comment(), reset_token_has_been_seen_p(), and update_C_comment().

◆ yy_accept

const flex_int16_t yy_accept[282]
static

Definition at line 641 of file clexer.c.

◆ yy_act

int yy_act

Definition at line 1832 of file clexer.c.

◆ yy_base

const flex_int16_t yy_base[329]
static

Definition at line 719 of file clexer.c.

◆ yy_bp

char * yy_bp

Definition at line 1831 of file clexer.c.

◆ yy_buffer_stack

YY_BUFFER_STATE* yy_buffer_stack = NULL
static

Stack as an array.

Definition at line 529 of file clexer.c.

◆ yy_buffer_stack_max

size_t yy_buffer_stack_max = 0
static

capacity of stack.

Definition at line 528 of file clexer.c.

◆ yy_buffer_stack_top

size_t yy_buffer_stack_top = 0
static

!YY_STRUCT_YY_BUFFER_STATE

Stack of input buffers. index of top of stack.

Definition at line 527 of file clexer.c.

◆ yy_c_buf_p

char* yy_c_buf_p = NULL
static

Points to current character in buffer.

Definition at line 551 of file clexer.c.

◆ yy_chk

const flex_int16_t yy_chk[903]
static

Definition at line 903 of file clexer.c.

◆ yy_cp

char* yy_cp

Definition at line 1831 of file clexer.c.

◆ YY_DECL

YY_DECL
Initial value:
{
yy_state_type yy_current_state
int yy_state_type
Definition: genread_lex.c:588

The main scanner function which does all the work.

Definition at line 1828 of file clexer.c.

◆ yy_def

const flex_int16_t yy_def[329]
static

Definition at line 759 of file clexer.c.

◆ yy_did_buffer_switch_on_eof

int yy_did_buffer_switch_on_eof
static

start state number

Flag which is used to allow yywrap()'s to do buffer switches instead of setting up a fresh yyin. A bit of a hack ...

Definition at line 558 of file clexer.c.

◆ yy_ec

const YY_CHAR yy_ec[256]
static

Definition at line 676 of file clexer.c.

◆ yy_flex_debug

int yy_flex_debug = 0

Definition at line 1019 of file clexer.c.

◆ yy_hold_char

char yy_hold_char
static

yy_hold_char holds the character lost when yytext is formed.

Definition at line 546 of file clexer.c.

◆ yy_init

int yy_init = 0
static

Definition at line 552 of file clexer.c.

Referenced by if().

◆ yy_last_accepting_cpos

char* yy_last_accepting_cpos
static

Definition at line 1016 of file clexer.c.

◆ yy_last_accepting_state

yy_state_type yy_last_accepting_state
static

Definition at line 1015 of file clexer.c.

◆ yy_meta

const YY_CHAR yy_meta[65]
static
Initial value:
=
{ 0,
1, 1, 1, 1, 2, 1, 1, 1, 3, 1,
1, 1, 1, 1, 1, 4, 1, 5, 5, 6,
1, 1, 1, 1, 1, 2, 6, 6, 6, 7,
8, 8, 9, 7, 1, 2, 1, 1, 7, 5,
5, 6, 6, 5, 7, 7, 7, 8, 7, 10,
7, 8, 7, 10, 7, 10, 9, 10, 10, 7,
1, 1, 1, 1
}

Definition at line 708 of file clexer.c.

◆ yy_n_chars

int yy_n_chars
static

Definition at line 547 of file clexer.c.

◆ yy_nxt

const flex_int16_t yy_nxt[903]
static

Definition at line 799 of file clexer.c.

◆ yy_rule_can_match_eol

const flex_int32_t yy_rule_can_match_eol[74]
static
Initial value:
=
{ 0,
1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }

Table of booleans, true if rule could match eol.

Definition at line 1008 of file clexer.c.

◆ yy_start

int yy_start = 0
static

whether we need to initialize

Definition at line 553 of file clexer.c.

Referenced by if().

◆ yyin

FILE* yyin

Definition at line 605 of file clexer.c.

◆ yyleng

int yyleng

number of characters read into yy_ch_buf

Definition at line 548 of file clexer.c.

◆ yylineno

int yylineno = 1

Begin user sect3.

Definition at line 610 of file clexer.c.

◆ yyout

FILE * yyout

Definition at line 418 of file clexer.c.

◆ yytext

char* yytext

Definition at line 1028 of file clexer.c.