CBMC
parser.h File Reference

Parser utilities. More...

#include "expr.h"
#include "message.h"
#include <filesystem>
#include <iosfwd>
#include <string>
#include <vector>
+ Include dependency graph for parser.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  parsert
 

Macros

#define newstack(x)   _newstack(PARSER, (x))
 
#define parser_stack(x)   (PARSER.stack[x])
 
#define stack_expr(x)   (PARSER.stack[x])
 
#define stack_type(x)    (static_cast<typet &>(static_cast<irept &>(PARSER.stack[x])))
 
#define YY_INPUT(buf, result, max_size)
 
#define YY_USER_ACTION   PARSER.advance_column(yyleng);
 

Functions

exprt_newstack (parsert &parser, unsigned &x)
 

Detailed Description

Parser utilities.

Definition in file parser.h.

Macro Definition Documentation

◆ newstack

#define newstack (   x)    _newstack(PARSER, (x))

Definition at line 141 of file parser.h.

◆ parser_stack

#define parser_stack (   x)    (PARSER.stack[x])

Definition at line 143 of file parser.h.

◆ stack_expr

#define stack_expr (   x)    (PARSER.stack[x])

Definition at line 144 of file parser.h.

◆ stack_type

#define stack_type (   x)     (static_cast<typet &>(static_cast<irept &>(PARSER.stack[x])))

Definition at line 145 of file parser.h.

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
do { \
for(result=0; result<max_size;) \
{ \
char ch; \
if(!PARSER.read(ch)) /* NOLINT(readability/braces) */ \
{ \
if(result==0) \
result=YY_NULL; \
break; \
} \
\
if(ch!='\r') /* NOLINT(readability/braces) */ \
{ \
buf[result++]=ch; \
if(ch=='\n') /* NOLINT(readability/braces) */ \
{ \
PARSER.inc_line_no(); \
break; \
} \
} \
} \
} while(0)

Definition at line 148 of file parser.h.

◆ YY_USER_ACTION

#define YY_USER_ACTION   PARSER.advance_column(yyleng);

Definition at line 175 of file parser.h.

Function Documentation

◆ _newstack()

exprt& _newstack ( parsert parser,
unsigned &  x 
)

Definition at line 19 of file parser.cpp.