User Guide
main_c.cpp File Reference

Example of standalone lexer program for C code. More...

Detailed Description

Example of standalone lexer program for C code.

This example demonstrate use of CLexer and CDriver classes to scan arbitrary C code.

Definition in file main_c.cpp.

#include <sstream>
#include "config/config.h"
#include "lexer/c11_lexer.hpp"
#include "parser/c11_driver.hpp"
#include "utils/logger.hpp"
#include <CLI/CLI.hpp>

Go to the source code of this file.

Typedefs

using Token = parser::CParser::token
 

Functions

void scan_c_code (std::istream &in)
 
int main (int argc, const char *argv[])
 

Typedef Documentation

◆ Token

using Token = parser::CParser::token

Definition at line 28 of file main_c.cpp.

Function Documentation

◆ main()

int main ( int  argc,
const char *  argv[] 
)

Definition at line 46 of file main_c.cpp.

◆ scan_c_code()

void scan_c_code ( std::istream &  in)

parse C file and print token until EOF

Definition at line 30 of file main_c.cpp.