cca.cxx File Reference

This file defines the cca program. More...

#include <cxxtls/cpp_token_stream.h>
#include <cxxtls/file.h>
#include <cxxtls/fmtd.h>
#include <portable_math.h>
#include <portable_strstream.h>
#include <portable_io.h>
#include <cxxtls/options.h>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <list>
#include <memory.h>
#include <iomanip>
#include <set>
Include dependency graph for cca.cxx:

Go to the source code of this file.

Classes

class  DefineHandler
 This class exists so as to define an override of the virtual operator method(). Its behavior is to include #defines into the output data. More...
struct  ElseifCounterInfo
class  FunctionScope
 The name and information associated with a function's scope. More...
struct  ScopeBinder
 A ScopeBinder object is created to save and restore the value of the variable, outer_scope. You save the old one at construction of the ScopeBinder object. On its destruction, the old value is restored. More...
struct  SummaryData

Defines

#define ASSUMED_TOKEN(type)

Functions

static string caseKeyWord ("case")
static string catchKeyWord ("catch")
static string classKeyWord ("class")
static string constKeyWord ("const")
static string defaultKeyWord ("default")
static string doKeyWord ("do")
static void eat_case_blocks ()
static void eat_curly_block ()
static void eat_function_body ()
static void eat_function_parms (string *parmtext=0)
static void eat_parenthesis ()
static void eat_template_parms ()
static void eat_till_semicolon ()
static void eat_type_name ()
static string elseKeyWord ("else")
static string enumKeyWord ("enum")
bool eof ()
static string extendsKeyWord ("extends")
static string externKeyWord ("extern")
static string forKeyWord ("for")
static string friendKeyWord ("friend")
static string ifKeyWord ("if")
 don't change this (except for debugging)
static string implementsKeyWord ("implements")
static void log_symbol (string type, string name, string file, int line, bool include_scope=true)
int main (int argc, char **argv, char **environ)
static string namespaceKeyWord ("namespace")
static void next_token ()
static string operatorKeyWord ("operator")
static bool parse_class ()
static bool parse_declaration (bool log_func_forward_decls=false)
static void parse_declarations (CPP_Buffer_Token_Source &s)
static bool parse_enum ()
static bool parse_extern ()
static void parse_file (FileName const &)
static bool parse_funcvar (bool log_forward_funcs_defs=false, bool handling_typedefs=false)
static bool parse_namespace ()
static bool parse_typedef ()
static bool parse_using ()
static void parse_variables_defined (bool log_func_forward_decls=false, bool handling_typedefs=false)
static void printInfo ()
static void printSummary ()
static string privateKeyWord ("private")
static bool process_statement (ElseifCounterInfo *)
static string protectedKeyWord ("protected")
static string publicKeyWord ("public")
static string returnKeyWord ("return")
static string staticKeyWord ("static")
static string structKeyWord ("struct")
static void summarize ()
static string switchKeyWord ("switch")
static string templateKeyWord ("template")
static string throwKeyWord ("throw")
static string tryKeyWord ("try")
static string typedefKeyWord ("typedef")
static string typenameKeyWord ("typename")
static string unionKeyWord ("union")
static string usingKeyWord ("using")
static string whileKeyWord ("while")

Variables

static bool collapse_elseif = true
 don't change this
static bool collapse_return = true
 collapse else-ifs to minimize CC number
static bool force_java_file = false
 print data for all functions
static bool grep_style_output = true
 print processed file names to stderr?
static bool isJavaFile = false
static bool log_all_tokens_to_stderr = false
 do names of files come from stdin?
static bool log_definitions = false
 treat all input files as java (java processing is buggy!)
static bool log_filenames_to_stderr = false
 copy tokens to stderr?
FunctionScope outer_scope
static ostreambuf_iterator
< char > * 
output
static bool print_functions = true
 print a summary at the end of execution
static bool print_summary = false
 collapse return in else clauses to reduce CC number
static bool read_filenames_from_stdin = false
static set< string > returnSynonyms
static CPP_Buffer_Token_Sourcestream
map< string, SummaryDatasummary
static CPP_Token token

Detailed Description

This file defines the cca program.

Definition in file cca.cxx.


Define Documentation

#define ASSUMED_TOKEN ( type   ) 
Value:
if(token.type_ != type) \
  { \
    cerr << token << ", error:  expected " << CPP_Token::type_name(type) << endl; \
    cerr << __FILE__ << ":" << __LINE__ << endl; \
    return true; \
  }

Definition at line 1028 of file cca.cxx.


Function Documentation

static string caseKeyWord ( "case"   )  [static]

Here is the caller graph for this function:

static string catchKeyWord ( "catch"   )  [static]

Here is the caller graph for this function:

static string classKeyWord ( "class"   )  [static]

Here is the caller graph for this function:

static string constKeyWord ( "const"   )  [static]

Here is the caller graph for this function:

static string defaultKeyWord ( "default"   )  [static]

Here is the caller graph for this function:

static string doKeyWord ( "do"   )  [static]

Here is the caller graph for this function:

static void eat_case_blocks (  )  [static]

Definition at line 2039 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static void eat_curly_block (  )  [static]

Definition at line 1970 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static void eat_function_body (  )  [static]

Definition at line 2490 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static void eat_function_parms ( string *  parmtext = 0  )  [static]

Definition at line 2555 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static void eat_parenthesis (  )  [static]

Definition at line 1938 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static void eat_template_parms (  )  [static]

Definition at line 2588 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static void eat_till_semicolon (  )  [static]

Definition at line 1999 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static void eat_type_name (  )  [static]

Definition at line 1728 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static string elseKeyWord ( "else"   )  [static]

Here is the caller graph for this function:

static string enumKeyWord ( "enum"   )  [static]

Here is the caller graph for this function:

bool eof (  ) 

Definition at line 993 of file cca.cxx.

Here is the call graph for this function:

static string extendsKeyWord ( "extends"   )  [static]

Here is the caller graph for this function:

static string externKeyWord ( "extern"   )  [static]

Here is the caller graph for this function:

static string forKeyWord ( "for"   )  [static]

Here is the caller graph for this function:

static string friendKeyWord ( "friend"   )  [static]

Here is the caller graph for this function:

static string ifKeyWord ( "if"   )  [static]

don't change this (except for debugging)

Here is the caller graph for this function:

static string implementsKeyWord ( "implements"   )  [static]

Here is the caller graph for this function:

static void log_symbol ( string  type,
string  name,
string  file,
int  line,
bool  include_scope = true 
) [static]

Definition at line 1169 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char **  argv,
char **  environ 
)

Definition at line 175 of file cca.cxx.

Here is the call graph for this function:

static string namespaceKeyWord ( "namespace"   )  [static]

Here is the caller graph for this function:

static void next_token (  )  [static]

Definition at line 929 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static string operatorKeyWord ( "operator"   )  [static]

Here is the caller graph for this function:

static bool parse_class (  )  [static]

Definition at line 1293 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool parse_declaration ( bool  log_func_forward_decls = false  )  [static]

Definition at line 1054 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static void parse_declarations ( CPP_Buffer_Token_Source s  )  [static]

Definition at line 1005 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool parse_enum (  )  [static]

Definition at line 1795 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool parse_extern (  )  [static]

Definition at line 3012 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static void parse_file ( FileName const &  name  )  [static]

Definition at line 655 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool parse_funcvar ( bool  log_forward_funcs_defs = false,
bool  handling_typedefs = false 
) [static]

Definition at line 2637 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool parse_namespace (  )  [static]

Definition at line 1853 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool parse_typedef (  )  [static]

Definition at line 1777 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool parse_using (  )  [static]

Definition at line 1896 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static void parse_variables_defined ( bool  log_func_forward_decls = false,
bool  handling_typedefs = false 
) [static]

Definition at line 1273 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static void printInfo (  )  [static]

Definition at line 3053 of file cca.cxx.

Here is the caller graph for this function:

static void printSummary (  )  [static]

Definition at line 856 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static string privateKeyWord ( "private"   )  [static]

Here is the caller graph for this function:

static bool process_statement ( ElseifCounterInfo elseifCounter  )  [static]

Definition at line 2124 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static string protectedKeyWord ( "protected"   )  [static]

Here is the caller graph for this function:

static string publicKeyWord ( "public"   )  [static]

Here is the caller graph for this function:

static string returnKeyWord ( "return"   )  [static]

Here is the caller graph for this function:

static string staticKeyWord ( "static"   )  [static]

Here is the caller graph for this function:

static string structKeyWord ( "struct"   )  [static]

Here is the caller graph for this function:

static void summarize (  )  [static]

Definition at line 916 of file cca.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static string switchKeyWord ( "switch"   )  [static]

Here is the caller graph for this function:

static string templateKeyWord ( "template"   )  [static]

Here is the caller graph for this function:

static string throwKeyWord ( "throw"   )  [static]

Here is the caller graph for this function:

static string tryKeyWord ( "try"   )  [static]

Here is the caller graph for this function:

static string typedefKeyWord ( "typedef"   )  [static]

Here is the caller graph for this function:

static string typenameKeyWord ( "typename"   )  [static]

Here is the caller graph for this function:

static string unionKeyWord ( "union"   )  [static]

Here is the caller graph for this function:

static string usingKeyWord ( "using"   )  [static]

Here is the caller graph for this function:

static string whileKeyWord ( "while"   )  [static]

Here is the caller graph for this function:


Variable Documentation

bool collapse_elseif = true [static]

don't change this

Definition at line 128 of file cca.cxx.

bool collapse_return = true [static]

collapse else-ifs to minimize CC number

Definition at line 129 of file cca.cxx.

bool force_java_file = false [static]

print data for all functions

Definition at line 132 of file cca.cxx.

bool grep_style_output = true [static]

print processed file names to stderr?

Definition at line 127 of file cca.cxx.

bool isJavaFile = false [static]

Definition at line 173 of file cca.cxx.

bool log_all_tokens_to_stderr = false [static]

do names of files come from stdin?

Definition at line 125 of file cca.cxx.

bool log_definitions = false [static]

treat all input files as java (java processing is buggy!)

Definition at line 134 of file cca.cxx.

bool log_filenames_to_stderr = false [static]

copy tokens to stderr?

Definition at line 126 of file cca.cxx.

Definition at line 838 of file cca.cxx.

ostreambuf_iterator<char>* output [static]

Definition at line 122 of file cca.cxx.

bool print_functions = true [static]

print a summary at the end of execution

Definition at line 131 of file cca.cxx.

bool print_summary = false [static]

collapse return in else clauses to reduce CC number

Definition at line 130 of file cca.cxx.

bool read_filenames_from_stdin = false [static]

Definition at line 124 of file cca.cxx.

set<string> returnSynonyms [static]

Definition at line 171 of file cca.cxx.

Definition at line 700 of file cca.cxx.

map<string, SummaryData> summary

Definition at line 854 of file cca.cxx.

CPP_Token token [static]

Definition at line 699 of file cca.cxx.

Generated on Wed Feb 29 22:50:42 2012 for CXXUtilities by  doxygen 1.6.3