ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
clang_c_lexert Class Reference

#include <clang_c_lexer.h>

Classes

struct  LexerContext

Public Member Functions

 clang_c_lexert ()
 ~clang_c_lexert ()
expr2tc parse_expr (const std::string &expr)
 Parse a C scalar-expression string into an IRep2 expression tree.

Constructor & Destructor Documentation

◆ clang_c_lexert()

clang_c_lexert::clang_c_lexert ( )

◆ ~clang_c_lexert()

clang_c_lexert::~clang_c_lexert ( )
default

Member Function Documentation

◆ parse_expr()

expr2tc clang_c_lexert::parse_expr ( const std::string & expr)

Parse a C scalar-expression string into an IRep2 expression tree.

Uses the Clang raw lexer and NumericLiteralParser. Supports comparison operators (==, !=, <, <=, >, >=) composed with && and || and parenthesised sub-expressions.

The special token

Returns
is emitted as symbol2tc(int64, "\\result"). Integer constants are emitted as constant_int2tc(int64, N). Callers are responsible for retyping these nodes to the target type before use.
Parameters
exprThe expression string to parse.
Returns
The parsed IRep2 expression, or a null expr2tc on parse error.

The documentation for this class was generated from the following files: