GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth > Class Template Referencefinal

#include <chaiscript_parser.hpp>

Inheritance diagram for chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >:
Collaboration diagram for chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >:

Classes

struct  Char_Parser

Public Member Functions

 ChaiScript_Parser (Tracer tracer=Tracer(), Optimizer optimizer=Optimizer())
Tracer & get_tracer ()
Optimizer & get_optimizer ()
 ChaiScript_Parser (const ChaiScript_Parser &)=delete
ChaiScript_Parser & operator= (const ChaiScript_Parser &)=delete
 ChaiScript_Parser (ChaiScript_Parser &&)=default
ChaiScript_Parser & operator= (ChaiScript_Parser &&)=delete
bool char_in_alphabet (char c, detail::Alphabet a) const
 test a char in an m_alphabet
void debug_print (const AST_Node &t, std::string prepend="") const override
 Prints the parsed ast_nodes as a tree.
template<typename NodeType>
void build_match (size_t t_match_start, std::string t_text="")
 Helper function that collects ast_nodes from a starting position to the top of the stack into a new AST node.
auto Symbol_ (const utility::Static_String &sym)
 Reads a symbol group from input if it matches the parameter, without skipping initial whitespace.
bool SkipComment ()
 Skips any multi-line or single-line comment.
bool SkipWS (bool skip_cr=false)
bool read_exponent_and_suffix ()
 Reads the optional exponent (scientific notation) and suffix for a Float.
bool Float_ ()
 Reads a floating point value from input, without skipping initial whitespace.
bool Hex_ ()
 Reads a hex value from input, without skipping initial whitespace.
void IntSuffix_ ()
 Reads an integer suffix.
bool Binary_ ()
 Reads a binary value from input, without skipping initial whitespace.
template<typename T, typename ... Param>
std::unique_ptr< eval::AST_Node_Impl< Tracer > > make_node (std::string t_match, const int t_prev_line, const int t_prev_col, Param &&...param)
bool Num ()
 Reads a number from the input, detecting if it's an integer or floating point.
bool Id_ ()
 Reads an identifier from input which conforms to C's identifier naming conventions, without skipping initial whitespace.
bool Id (const bool validate)
 Reads (and potentially captures) an identifier from input.
bool Arg (const bool t_type_allowed=true)
 Reads an argument from input.
bool Quoted_String_ ()
 Reads a quoted string from input, without skipping initial whitespace.
bool Quoted_String ()
 Reads (and potentially captures) a quoted string from input. Translates escaped sequences.
bool Single_Quoted_String_ ()
 Reads a character group from input, without skipping initial whitespace.
bool Single_Quoted_String ()
 Reads (and potentially captures) a char group from input. Translates escaped sequences.
bool Char_ (const char c)
 Reads a char from input if it matches the parameter, without skipping initial whitespace.
bool Char (const char t_c)
 Reads (and potentially captures) a char from input if it matches the parameter.
bool Keyword_ (const utility::Static_String &t_s)
 Reads a string from input if it matches the parameter, without skipping initial whitespace.
bool Keyword (const utility::Static_String &t_s)
 Reads (and potentially captures) a string from input if it matches the parameter.
bool is_operator (const std::string &t_s) const
bool Symbol (const utility::Static_String &t_s, const bool t_disallow_prevention=false)
 Reads (and potentially captures) a symbol group from input if it matches the parameter.
bool Eol_ (const bool t_eos=false)
 Reads an end-of-line group from input, without skipping initial whitespace.
bool Eos ()
 Reads until the end of the current statement.
bool Eol ()
 Reads (and potentially captures) an end-of-line group from input.
bool Id_Arg_List ()
 Reads a comma-separated list of values from input. Id's only, no types allowed.
bool Decl_Arg_List ()
 Reads a comma-separated list of values from input, for function declarations.
bool Arg_List ()
 Reads a comma-separated list of values from input.
bool Container_Arg_List ()
 Reads possible special container values, including ranges and map_pairs.
bool Lambda ()
 Reads a lambda (anonymous function) from input.
bool Def (const bool t_class_context=false, const std::string &t_class_name="")
 Reads a function definition from input.
bool Try ()
 Reads a function definition from input.
bool If ()
 Reads an if/else if/else block from input.
bool Class (const bool t_class_allowed)
 Reads a class block from input.
bool While ()
 Reads a while block from input.
bool Range_Expression ()
 Reads the ranged for conditions from input.
bool For_Guards ()
 Reads the C-style for conditions from input.
bool For ()
 Reads a for block from input.
bool Case ()
 Reads a case block from input.
bool Switch ()
 Reads a switch statement from input.
bool Class_Block (const std::string &t_class_name)
 Reads a curly-brace C-style class block from input.
bool Block ()
 Reads a curly-brace C-style block from input.
bool Return ()
 Reads a return statement from input.
bool Break ()
 Reads a break statement from input.
bool Continue ()
 Reads a continue statement from input.
bool Dot_Fun_Array ()
 Reads a dot expression(member access), then proceeds to check if it's a function or array call.
bool Var_Decl (const bool t_class_context=false, const std::string &t_class_name="")
 Reads a variable declaration from input.
bool Paren_Expression ()
 Reads an expression surrounded by parentheses from input.
bool Inline_Container ()
 Reads, and identifies, a short-form container initialization from input.
bool Reference ()
 Parses a variable specified with a & aka reference.
bool Prefix ()
 Reads a unary prefixed expression from input.
bool Value ()
 Parses any of a group of 'value' style ast_node groups from input.
bool Operator_Helper (const size_t t_precedence, std::string &oper)
bool Operator (const size_t t_precedence=0)
bool Map_Pair ()
 Reads a pair of values used to create a map initialization from input.
bool Value_Range ()
 Reads a pair of values used to create a range initialization from input.
bool Equation ()
 Parses a string of binary equation operators.
bool Class_Statements (const std::string &t_class_name)
 Parses statements allowed inside of a class block.
bool Statements (const bool t_class_allowed=false)
 Top level parser, starts parsing of all known parses.
AST_NodePtr parse (const std::string &t_input, const std::string &t_fname) override
eval::AST_Node_Impl_Ptr< Tracer > parse_instr_eval (const std::string &t_input)
AST_NodePtr parse_internal (const std::string &t_input, std::string t_fname)
 Parses the given input string, tagging parsed ast_nodes with the given m_filename.
Public Member Functions inherited from chaiscript::parser::ChaiScript_Parser_Base
virtual ~ChaiScript_Parser_Base ()=default
 ChaiScript_Parser_Base ()=default
 ChaiScript_Parser_Base (ChaiScript_Parser_Base &&)=default
ChaiScript_Parser_Base & operator= (ChaiScript_Parser_Base &&)=delete
ChaiScript_Parser_Base & operator= (const ChaiScript_Parser_Base &&)=delete
template<typename T>
T & get_tracer ()

Static Public Member Functions

static Boxed_Value buildFloat (const std::string &t_val)
 Parses a floating point value and returns a Boxed_Value representation of it.
static Boxed_Value buildInt (const int base, const std::string &t_val, const bool prefixed)

Additional Inherited Members

Protected Member Functions inherited from chaiscript::parser::ChaiScript_Parser_Base
 ChaiScript_Parser_Base (const ChaiScript_Parser_Base &)=default

Constructor & Destructor Documentation

◆ ChaiScript_Parser() [1/3]

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::ChaiScript_Parser ( Tracer tracer = Tracer(),
Optimizer optimizer = Optimizer() )
inlineexplicit
Here is the caller graph for this function:

◆ ChaiScript_Parser() [2/3]

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::ChaiScript_Parser ( const ChaiScript_Parser< Tracer, Optimizer, Parse_Depth > & )
delete

◆ ChaiScript_Parser() [3/3]

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::ChaiScript_Parser ( ChaiScript_Parser< Tracer, Optimizer, Parse_Depth > && )
default

Member Function Documentation

◆ Arg()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Arg ( const bool t_type_allowed = true)
inline

Reads an argument from input.

◆ Arg_List()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Arg_List ( )
inline

Reads a comma-separated list of values from input.

◆ Binary_()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Binary_ ( )
inline

Reads a binary value from input, without skipping initial whitespace.

Here is the caller graph for this function:

◆ Block()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Block ( )
inline

Reads a curly-brace C-style block from input.

◆ Break()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Break ( )
inline

Reads a break statement from input.

◆ build_match()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
template<typename NodeType>
void chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::build_match ( size_t t_match_start,
std::string t_text = "" )
inline

Helper function that collects ast_nodes from a starting position to the top of the stack into a new AST node.

Todo
fix the fact that a successful match that captured no ast_nodes doesn't have any real start position
Here is the caller graph for this function:

◆ buildFloat()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
Boxed_Value chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::buildFloat ( const std::string & t_val)
inlinestatic

Parses a floating point value and returns a Boxed_Value representation of it.

Here is the caller graph for this function:

◆ buildInt()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
Boxed_Value chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::buildInt ( const int base,
const std::string & t_val,
const bool prefixed )
inlinestatic
Here is the caller graph for this function:

◆ Case()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Case ( )
inline

Reads a case block from input.

◆ Char()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Char ( const char t_c)
inline

Reads (and potentially captures) a char from input if it matches the parameter.

Here is the caller graph for this function:

◆ Char_()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Char_ ( const char c)
inline

Reads a char from input if it matches the parameter, without skipping initial whitespace.

Here is the caller graph for this function:

◆ char_in_alphabet()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::char_in_alphabet ( char c,
detail::Alphabet a ) const
inline

test a char in an m_alphabet

Here is the caller graph for this function:

◆ Class()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Class ( const bool t_class_allowed)
inline

Reads a class block from input.

◆ Class_Block()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Class_Block ( const std::string & t_class_name)
inline

Reads a curly-brace C-style class block from input.

Here is the caller graph for this function:

◆ Class_Statements()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Class_Statements ( const std::string & t_class_name)
inline

Parses statements allowed inside of a class block.

Here is the caller graph for this function:

◆ Container_Arg_List()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Container_Arg_List ( )
inline

Reads possible special container values, including ranges and map_pairs.

Here is the caller graph for this function:

◆ Continue()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Continue ( )
inline

Reads a continue statement from input.

◆ debug_print()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
void chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::debug_print ( const AST_Node & t,
std::string prepend = "" ) const
inlineoverridevirtual

Prints the parsed ast_nodes as a tree.

Implements chaiscript::parser::ChaiScript_Parser_Base.

Here is the caller graph for this function:

◆ Decl_Arg_List()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Decl_Arg_List ( )
inline

Reads a comma-separated list of values from input, for function declarations.

Here is the caller graph for this function:

◆ Def()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Def ( const bool t_class_context = false,
const std::string & t_class_name = "" )
inline

Reads a function definition from input.

◆ Dot_Fun_Array()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Dot_Fun_Array ( )
inline

Reads a dot expression(member access), then proceeds to check if it's a function or array call.

Todo
Work around for method calls until we have a better solution
Here is the caller graph for this function:

◆ Eol()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Eol ( )
inline

Reads (and potentially captures) an end-of-line group from input.

Here is the caller graph for this function:

◆ Eol_()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Eol_ ( const bool t_eos = false)
inline

Reads an end-of-line group from input, without skipping initial whitespace.

Here is the caller graph for this function:

◆ Eos()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Eos ( )
inline

Reads until the end of the current statement.

Here is the caller graph for this function:

◆ Equation()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Equation ( )
inline

Parses a string of binary equation operators.

◆ Float_()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Float_ ( )
inline

Reads a floating point value from input, without skipping initial whitespace.

Here is the caller graph for this function:

◆ For()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::For ( )
inline

Reads a for block from input.

◆ For_Guards()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::For_Guards ( )
inline

Reads the C-style for conditions from input.

Here is the caller graph for this function:

◆ get_optimizer()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
Optimizer & chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::get_optimizer ( )
inline

◆ get_tracer()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
Tracer & chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::get_tracer ( )
inline

◆ Hex_()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Hex_ ( )
inline

Reads a hex value from input, without skipping initial whitespace.

Here is the caller graph for this function:

◆ Id()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Id ( const bool validate)
inline

Reads (and potentially captures) an identifier from input.

Here is the caller graph for this function:

◆ Id_()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Id_ ( )
inline

Reads an identifier from input which conforms to C's identifier naming conventions, without skipping initial whitespace.

Here is the caller graph for this function:

◆ Id_Arg_List()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Id_Arg_List ( )
inline

Reads a comma-separated list of values from input. Id's only, no types allowed.

Here is the caller graph for this function:

◆ If()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::If ( )
inline

Reads an if/else if/else block from input.

◆ Inline_Container()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Inline_Container ( )
inline

Reads, and identifies, a short-form container initialization from input.

Here is the caller graph for this function:

◆ IntSuffix_()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
void chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::IntSuffix_ ( )
inline

Reads an integer suffix.

Here is the caller graph for this function:

◆ is_operator()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::is_operator ( const std::string & t_s) const
inline
Here is the caller graph for this function:

◆ Keyword()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Keyword ( const utility::Static_String & t_s)
inline

Reads (and potentially captures) a string from input if it matches the parameter.

Here is the caller graph for this function:

◆ Keyword_()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Keyword_ ( const utility::Static_String & t_s)
inline

Reads a string from input if it matches the parameter, without skipping initial whitespace.

Here is the caller graph for this function:

◆ Lambda()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Lambda ( )
inline

Reads a lambda (anonymous function) from input.

◆ make_node()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
template<typename T, typename ... Param>
std::unique_ptr< eval::AST_Node_Impl< Tracer > > chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::make_node ( std::string t_match,
const int t_prev_line,
const int t_prev_col,
Param &&... param )
inline
Here is the caller graph for this function:

◆ Map_Pair()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Map_Pair ( )
inline

Reads a pair of values used to create a map initialization from input.

◆ Num()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Num ( )
inline

Reads a number from the input, detecting if it's an integer or floating point.

◆ Operator()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Operator ( const size_t t_precedence = 0)
inline
Here is the caller graph for this function:

◆ operator=() [1/2]

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
ChaiScript_Parser & chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::operator= ( ChaiScript_Parser< Tracer, Optimizer, Parse_Depth > && )
delete

◆ operator=() [2/2]

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
ChaiScript_Parser & chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::operator= ( const ChaiScript_Parser< Tracer, Optimizer, Parse_Depth > & )
delete

◆ Operator_Helper()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Operator_Helper ( const size_t t_precedence,
std::string & oper )
inline
Here is the caller graph for this function:

◆ Paren_Expression()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Paren_Expression ( )
inline

Reads an expression surrounded by parentheses from input.

Here is the caller graph for this function:

◆ parse()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
AST_NodePtr chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::parse ( const std::string & t_input,
const std::string & t_fname )
inlineoverridevirtual

◆ parse_instr_eval()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
eval::AST_Node_Impl_Ptr< Tracer > chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::parse_instr_eval ( const std::string & t_input)
inline
Here is the caller graph for this function:

◆ parse_internal()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
AST_NodePtr chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::parse_internal ( const std::string & t_input,
std::string t_fname )
inline

Parses the given input string, tagging parsed ast_nodes with the given m_filename.

Here is the caller graph for this function:

◆ Prefix()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Prefix ( )
inline

Reads a unary prefixed expression from input.

◆ Quoted_String()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Quoted_String ( )
inline

Reads (and potentially captures) a quoted string from input. Translates escaped sequences.

Here is the caller graph for this function:

◆ Quoted_String_()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Quoted_String_ ( )
inline

Reads a quoted string from input, without skipping initial whitespace.

Here is the caller graph for this function:

◆ Range_Expression()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Range_Expression ( )
inline

Reads the ranged for conditions from input.

Here is the caller graph for this function:

◆ read_exponent_and_suffix()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::read_exponent_and_suffix ( )
inline

Reads the optional exponent (scientific notation) and suffix for a Float.

Here is the caller graph for this function:

◆ Reference()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Reference ( )
inline

Parses a variable specified with a & aka reference.

◆ Return()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Return ( )
inline

Reads a return statement from input.

◆ Single_Quoted_String()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Single_Quoted_String ( )
inline

Reads (and potentially captures) a char group from input. Translates escaped sequences.

Here is the caller graph for this function:

◆ Single_Quoted_String_()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Single_Quoted_String_ ( )
inline

Reads a character group from input, without skipping initial whitespace.

Here is the caller graph for this function:

◆ SkipComment()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::SkipComment ( )
inline

Skips any multi-line or single-line comment.

Here is the caller graph for this function:

◆ SkipWS()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::SkipWS ( bool skip_cr = false)
inline

Skips ChaiScript whitespace, which means space and tab, but not cr/lf jespada: Modified SkipWS to skip optionally CR ('
') and/or LF+CR ("\r\n") AlekMosingiewicz: Added exception when illegal character detected

Here is the caller graph for this function:

◆ Statements()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Statements ( const bool t_class_allowed = false)
inline

Top level parser, starts parsing of all known parses.

Here is the caller graph for this function:

◆ Switch()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Switch ( )
inline

Reads a switch statement from input.

◆ Symbol()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Symbol ( const utility::Static_String & t_s,
const bool t_disallow_prevention = false )
inline

Reads (and potentially captures) a symbol group from input if it matches the parameter.

Here is the caller graph for this function:

◆ Symbol_()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
auto chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Symbol_ ( const utility::Static_String & sym)
inline

Reads a symbol group from input if it matches the parameter, without skipping initial whitespace.

Here is the caller graph for this function:

◆ Try()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Try ( )
inline

Reads a function definition from input.

◆ Value()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Value ( )
inline

Parses any of a group of 'value' style ast_node groups from input.

Here is the caller graph for this function:

◆ Value_Range()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Value_Range ( )
inline

Reads a pair of values used to create a range initialization from input.

◆ Var_Decl()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::Var_Decl ( const bool t_class_context = false,
const std::string & t_class_name = "" )
inline

Reads a variable declaration from input.

◆ While()

template<typename Tracer, typename Optimizer, std::size_t Parse_Depth = 512>
bool chaiscript::parser::ChaiScript_Parser< Tracer, Optimizer, Parse_Depth >::While ( )
inline

Reads a while block from input.


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