eRPC Generator (erpcgen)  Rev. 1.12.0
NXP Semiconductors
erpcgen::SymbolScanner Class Reference

Scans for symbol names. More...

#include <SymbolScanner.hpp>

Inheritance diagram for erpcgen::SymbolScanner:
erpcgen::AstWalker

Public Member Functions

 SymbolScanner (SymbolScope *globals)
 This function is constructor of symbol scanner class. More...
 
 SymbolScanner (SymbolScope *globals, const std::string &fileName)
 This function is constructor of symbol scanner class. More...
 
virtual ~SymbolScanner ()
 Destructor.
 
ProgramgetProgram ()
 Program is out of global symbol scope. More...
 
- Public Member Functions inherited from erpcgen::AstWalker
 AstWalker ()=default
 default constructor
 
 AstWalker (const std::string &inputFile)
 Constructor. More...
 
virtual ~AstWalker ()=default
 destructor
 
virtual void startWalk (AstNode *node)
 This function walk the AstNode depth-first and invoke handler methods. More...
 

Protected Member Functions

virtual void handleRoot (AstNode *node, bottom_up) override
 This function is called at the end of scanning. More...
 
virtual AstNodehandleProgram (AstNode *node, top_down) override
 This function start handle program. More...
 
virtual AstNodehandleProgram (AstNode *node, bottom_up) override
 This function start handle program. More...
 
virtual AstNodehandleConst (AstNode *node, bottom_up) override
 This function handles a constant definition. More...
 
virtual AstNodehandleType (AstNode *node, top_down) override
 This function start handle type. More...
 
virtual AstNodehandleType (AstNode *node, bottom_up) override
 This function end handle type. More...
 
virtual AstNodehandleEnum (AstNode *node, top_down) override
 This function end handle enum. More...
 
virtual AstNodehandleEnum (AstNode *node, bottom_up) override
 This function end handle enum. More...
 
virtual AstNodehandleEnumMember (AstNode *node, bottom_up) override
 This function end handle enum member. More...
 
bool enumMemberHasValue (AstNode *enumMember)
 Check to see if enum member is assigned a value by the user. More...
 
virtual AstNodehandleExpr (AstNode *node, bottom_up) override
 This function start handle expression. More...
 
virtual AstNodehandleBinaryOp (AstNode *node, bottom_up) override
 This function end handle binary operator. More...
 
virtual AstNodehandleUnaryOp (AstNode *node, bottom_up) override
 This function end handle unary operator. More...
 
virtual AstNodehandleStruct (AstNode *node, top_down) override
 This function start handle struct. More...
 
virtual AstNodehandleStruct (AstNode *node, bottom_up) override
 This function end handle struct. More...
 
virtual AstNodehandleStructMember (AstNode *node, bottom_up) override
 This function end handle struct member. More...
 
virtual AstNodehandleUnion (AstNode *node, top_down) override
 Handles Union data type while traversing down the AST. More...
 
virtual AstNodehandleUnion (AstNode *node, bottom_up) override
 Handles Union data type while traversing down the AST. More...
 
virtual AstNodehandleUnionCase (AstNode *node, top_down) override
 
virtual AstNodehandleUnionCase (AstNode *node, bottom_up) override
 This function end handle struct member. More...
 
virtual AstNodehandleInterface (AstNode *node, top_down) override
 This function start handle interface. More...
 
virtual AstNodehandleInterface (AstNode *node, bottom_up) override
 This function end handle interface. More...
 
virtual AstNodehandleFunction (AstNode *node, top_down) override
 This function start handle function. More...
 
virtual AstNodehandleFunction (AstNode *node, bottom_up) override
 This function end handle function. More...
 
virtual AstNodehandleParam (AstNode *node, top_down) override
 This function start handle function parameter. More...
 
virtual AstNodehandleParam (AstNode *node, bottom_up) override
 This function end handle function parameter. More...
 
void setParameterDirection (StructMember *param, AstNode *directionNode)
 set parameter direction: in, out, inout More...
 
ValuegetValueFromSymbol (const Token &tok)
 Get value from symbol table for name defined by given token. More...
 
DataTypegetDataTypeForConst (AstNode *typeNode)
 This function returns the data type for a constant variable. More...
 
bool containsStructEnumDeclaration (const AstNode *typeNode)
 Returns true when given Astnode is enum or structure declaration. More...
 
DataTypelookupDataType (const AstNode *typeNode)
 This function returns pointer to new type object. More...
 
DataTypecreateListType (const AstNode *typeNode)
 This function returns pointer to new list object. More...
 
DataTypecreateArrayType (const AstNode *typeNode)
 This function returns pointer to new array object. More...
 
DataTypelookupDataTypeByName (const Token &tok, SymbolScope *scope, bool recursive=true)
 This function returns pointer to new type object. More...
 
uint64_t getIntExprValue (const AstNode *exprNode)
 This function returns token integer value. More...
 
bool rhsIsAStringLiteral (AstNode *rhs)
 Determines if the right hand side of a constant declaration is a string literal. More...
 
bool rhsIsAnExpression (AstNode *rhs)
 Determines if the right hand side of a constant declaration is an expression. More...
 
ValuegetValueForConst (AstNode *const node, DataType *const constDataType)
 Gets the value object for the const variable. More...
 
void addAnnotations (AstNode *childTok, Symbol *symbol)
 This function add annotations to vector of symbol annotations. More...
 
void checkAnnotationBeforeAdding (AstNode *annotation, Symbol *symbol)
 This function check annotation just before it will be added to symbol. More...
 
ValuegetAnnotationValue (AstNode *annotationNode)
 Helper function to get Value from annotation AstNode. More...
 
Annotation::program_lang_t getAnnotationLang (AstNode *annotationNode)
 Helper function to get programming language type if specified for which is annotation intended. More...
 
void scanStructForAnnotations ()
 Controlling annotations used on structure members. More...
 
void addDoxygenComments (Symbol *symbol, AstNode *above, AstNode *trailing)
 This function sets to given symbol given doxygen comments. More...
 
StructMembercreateCallbackParam (StructMember *structMember, const std::string &name)
 This function creates new function parameter. More...
 
void addForwardDeclaration (DataType *dataType)
 This function registers forward union/structure declarations. More...
 
void removeForwardDeclaration (DataType *dataType)
 This function unregister union/structure declarations. More...
 
void addGlobalSymbol (Symbol *symbol)
 This function add symbol into global symbol scope. More...
 
- Protected Member Functions inherited from erpcgen::AstWalker
virtual void walk (AstNode *node)
 This function walk the AstNode depth-first and invoke handler methods. More...
 
template<typename D >
void dispatch (AstNode *node)
 This function invoke the appropriate handler method for the node's token type.. More...
 
virtual void handleRoot (AstNode *node, top_down)
 
virtual AstNodehandleConst (AstNode *node, top_down)
 
virtual AstNodehandleChildren (AstNode *node, top_down)
 
virtual AstNodehandleEnumMember (AstNode *node, top_down)
 
virtual AstNodehandleStructMember (AstNode *node, top_down)
 
virtual AstNodehandleExpr (AstNode *node, top_down)
 
virtual AstNodehandleBinaryOp (AstNode *node, top_down)
 
virtual AstNodehandleUnaryOp (AstNode *node, top_down)
 
virtual AstNodehandleAnnotation (AstNode *node, top_down)
 
virtual AstNodehandleChildren (AstNode *node, bottom_up)
 
virtual AstNodehandleAnnotation (AstNode *node, bottom_up)
 

Protected Attributes

SymbolScopem_globals
 
Interfacem_currentInterface
 
StructTypem_currentStruct
 
Programm_currentProgram
 
EnumTypem_currentEnum
 
AliasTypem_currentAlias
 
UnionTypem_currentUnion
 
std::vector< UnionCase * > m_emptyUnionCases
 
std::map< std::string, DataType * > m_forwardDeclarations
 
- Protected Attributes inherited from erpcgen::AstWalker
std::string m_fileName
 Stores name of file from which AST was built.
 

Detailed Description

Scans for symbol names.

Constructor & Destructor Documentation

erpcgen::SymbolScanner::SymbolScanner ( SymbolScope globals)
inlineexplicit

This function is constructor of symbol scanner class.

This function set their variables to default values, when object is created.

Parameters
[in]globalsGlobal symbol scope variable.
erpcgen::SymbolScanner::SymbolScanner ( SymbolScope globals,
const std::string &  fileName 
)
inline

This function is constructor of symbol scanner class.

This function set their variables to default values, when object is created.

Parameters
[in]globalsGlobal symbol scope variable.
[in]fileNamename of IDL from which AST was built.

Member Function Documentation

void SymbolScanner::addAnnotations ( AstNode childTok,
Symbol symbol 
)
protected

This function add annotations to vector of symbol annotations.

Parameters
[in]childTokAstNode contains annotations information.
[in]symbolSymbol containing vector of annotations belongs to him.
void SymbolScanner::addDoxygenComments ( Symbol symbol,
AstNode above,
AstNode trailing 
)
protected

This function sets to given symbol given doxygen comments.

Comments can be placed above declaration or as trailing comments.

Parameters
[in]symbolSymbol where doxygen comments will be added.
[in]aboveDoxygen comments placed above.
[in]trailingTrailing doxygen comments.
void SymbolScanner::addForwardDeclaration ( DataType dataType)
protected

This function registers forward union/structure declarations.

Parameters
[in]dataTypeUnion/structure data type.
void SymbolScanner::addGlobalSymbol ( Symbol symbol)
protected

This function add symbol into global symbol scope.

Parameters
[in]dataTypeUnion/structure data type.
void SymbolScanner::checkAnnotationBeforeAdding ( AstNode annotation,
Symbol symbol 
)
protected

This function check annotation just before it will be added to symbol.

Parameters
[in]annotationNode containing information about annotation.
[in]symbolSymbol containing vector of annotations belongs to him.
bool SymbolScanner::containsStructEnumDeclaration ( const AstNode typeNode)
protected

Returns true when given Astnode is enum or structure declaration.

Parameters
[in]typeNodeNode, which data type is searched.
Return values
truewhen AstNode is enum/struct declaration.
falsewhen AstNode is not enum/struct declaration.
DataType * SymbolScanner::createArrayType ( const AstNode typeNode)
protected

This function returns pointer to new array object.

The function returns pointer to new array object with set array size and nested element type.

Parameters
[in]typeNodeNode, which has array token type.
Returns
Return new array data type.
See also
DataType * SymbolScanner::createListType(const AstNode * typeNode, const std::string &name)
DataType * SymbolScanner::lookupDataTypeByName(const Token * tok, const std::string &name)
StructMember * SymbolScanner::createCallbackParam ( StructMember structMember,
const std::string &  name 
)
protected

This function creates new function parameter.

Function parameter information are set based on given structure member, which is param member of function type.

Parameters
[in]structMemberFunction type param member.
[in]nameParam name.
Returns
new function (callback) parameter.
DataType * SymbolScanner::createListType ( const AstNode typeNode)
protected

This function returns pointer to new list object.

The function returns pointer to new list object with set list variable name for list size and nested element type.

Parameters
[in]typeNodeNode, which has list token type.
Returns
Return new list data type.
See also
DataType * SymbolScanner::createArrayType(const AstNode * typeNode, const std::string &name)
DataType * SymbolScanner::lookupDataTypeByName(const Token * tok, const std::string &name)
bool SymbolScanner::enumMemberHasValue ( AstNode enumMember)
protected

Check to see if enum member is assigned a value by the user.

Parameters
[in]enumMemberAST node type enum member.
Return values
Returnswhether or not the enum member has user-defined value.
Annotation::program_lang_t SymbolScanner::getAnnotationLang ( AstNode annotationNode)
protected

Helper function to get programming language type if specified for which is annotation intended.

Parameters
[in]annotationNodeAstNode pointing to the annotation
Returns
Programming language type.
Value * SymbolScanner::getAnnotationValue ( AstNode annotationNode)
protected

Helper function to get Value from annotation AstNode.

Parameters
[in]annotationNodeAstNode pointing to the annotation
Returns
Value pointer for annotation
DataType * SymbolScanner::getDataTypeForConst ( AstNode typeNode)
protected

This function returns the data type for a constant variable.

Parameters
[in]typeNodeNode referring to the data type
Returns
DataType of the constant variable
uint64_t SymbolScanner::getIntExprValue ( const AstNode exprNode)
protected

This function returns token integer value.

The function returns token integer value, when when given AstNode is expression and his child token is equal TOK_INT_LITERAL. Otherwise throw error.

Parameters
[in]exprNodeExpression node.
Returns
Integer value from expression node.
Exceptions
semantic_errorThrown if given ast node has not child with token type TOK_INT_LITERAL.
Program* erpcgen::SymbolScanner::getProgram ( )
inline

Program is out of global symbol scope.

Returns
Program symbol.
Value * SymbolScanner::getValueForConst ( AstNode *const  node,
DataType *const  constDataType 
)
protected

Gets the value object for the const variable.

Parameters
[in]nodeParent const node
[in]constDataTypeconst variable's data type
Returns
Literal value assigned to const variable
Value * SymbolScanner::getValueFromSymbol ( const Token tok)
protected

Get value from symbol table for name defined by given token.

Parameters
[in]tokToken with symbol name defined
Return values
Valueobject for name defined by given token
Exceptions
syntax_errorThrown, when token value is null or when symbol is not defined in global symbol scope.
semantic_errorThrown, when symbol type is not constant or enum member.
AstNode * SymbolScanner::handleBinaryOp ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function end handle binary operator.

This function handle binary operator for integer and float value.

Parameters
[in]nodeAST node.
Returns
New AstNode with binary result.
Return values
nullptrReturn null pointer, when left or right token value of given AstNode can't be cast to IntegerValue or FloatValue.
Exceptions
internal_errorThrown if is used unknown binary operator for integer or float value.
semantic_errorThrown if is used invalid binary operators on float value.
See also
AstNode * SymbolScanner::handleExpr()
AstNode * SymbolScanner::handleUnaryOp()

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleConst ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function handles a constant definition.

Parameters
[in]nodeAST node const type definition).
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleEnum ( AstNode node,
top_down   
)
overrideprotectedvirtual

This function end handle enum.

The function set enum variable m_currentEnum to null.

Parameters
[in]nodeAST node type enum.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleEnum ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function end handle enum.

The function set enum variable m_currentEnum to null.

Parameters
[in]nodeAST node type enum.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleEnumMember ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function end handle enum member.

The function set to enum member variable m_currentEnumMember to null.

Parameters
[in]nodeAST node type enum member.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleExpr ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function start handle expression.

Parameters
[in]nodeAST node type expression.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleFunction ( AstNode node,
top_down   
)
overrideprotectedvirtual

This function start handle function.

The function add function to interface functions vector. Also initialize function parameters vector. For function is also set name and return type.

Parameters
[in]nodeAST node type function.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleFunction ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function end handle function.

The function set function parameters vector variable to null.

Parameters
[in]nodeAST node type function.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleInterface ( AstNode node,
top_down   
)
overrideprotectedvirtual

This function start handle interface.

The function add interface to symbol m_globals variable. Also initialize interface functions vector. For interface is also set name.

Parameters
[in]nodeAST node type interface.
Return values
nullptrAlways return null pointer.
Exceptions
Throwsemantic error, when struct member data type name is same as struct name (nested structs).
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleInterface ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function end handle interface.

The function set interface functions vector variable to null.

Parameters
[in]nodeAST node type interface.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleParam ( AstNode node,
top_down   
)
overrideprotectedvirtual

This function start handle function parameter.

The function add function parameter to function parameters vector. The function also set name and data type to parameter.

Parameters
[in]nodeAST node type parameter.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions
Exceptions
semantic_errorThrown if given ast node has not child with token type TOK_IN, TOK_OUT, TOK_INOUT.

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleParam ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function end handle function parameter.

Parameters
[in]nodeAST node type parameter.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions
Exceptions
semantic_errorThrown if given ast node has not child with token type TOK_IN, TOK_OUT, TOK_INOUT.

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleProgram ( AstNode node,
top_down   
)
overrideprotectedvirtual

This function start handle program.

Parameters
[in]nodeAST node program (type definition).
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleProgram ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function start handle program.

Parameters
[in]nodeAST node program (type definition).
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

void SymbolScanner::handleRoot ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function is called at the end of scanning.

Parameters
[in]nodeRoot node.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleStruct ( AstNode node,
top_down   
)
overrideprotectedvirtual

This function start handle struct.

The function add struct to symbol scope variable m_globals. For struct is also set name and this struct is set to struct variable m_currentStruct.

Parameters
[in]nodeAST node type struct.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions
Exceptions
semantic_errorThrown if an given node has not children and is not alias (type definition).

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleStruct ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function end handle struct.

The function set struct variable m_currentStruct to null.

Parameters
[in]nodeAST node type struct.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleStructMember ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function end handle struct member.

The function add struct member to struct m_currentStruct variable. For struct member is also set name and data type.

Parameters
[in]nodeAST node type struct member.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleType ( AstNode node,
top_down   
)
overrideprotectedvirtual

This function start handle type.

The function set alias (type definition) to symbol scope variable m_globals. Also set name and data type to alias. Bool variable m_isInTypedef is set to true.

Parameters
[in]nodeAST node type alias (type definition).
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleType ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function end handle type.

The function set bool variable m_isInTypedef to false.

Parameters
[in]nodeAST node type alias (type definition).
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleUnaryOp ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function end handle unary operator.

This function handle unary operator for integer and float value.

Parameters
[in]nodeAST node.
Returns
New AstNode with integer or float result.
Return values
nullptrReturn null pointer, when value of AstNode token can't be cast to FloatValue or IntegerValue.
Exceptions
internal_errorThrown if is used unknown unary operator for integer or float value.
semantic_errorThrown if is used unary operator '~' on float value.
See also
AstNode * SymbolScanner::handleExpr()
AstNode * SymbolScanner::handleBinaryOp()

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleUnion ( AstNode node,
top_down   
)
overrideprotectedvirtual

Handles Union data type while traversing down the AST.

The function sets the variable m_currentUnion.

Parameters
[in]nodeAST node type struct.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleUnion ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

Handles Union data type while traversing down the AST.

The function add m_currentUnion to m_currentStruct.

Parameters
[in]nodeAST node type struct.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleUnionCase ( AstNode node,
top_down   
)
overrideprotectedvirtual
Parameters
[in]nodeAST node type struct member.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

AstNode * SymbolScanner::handleUnionCase ( AstNode node,
bottom_up   
)
overrideprotectedvirtual

This function end handle struct member.

The function add union cases to union m_currentUnion variable.

Parameters
[in]nodeAST node type struct member.
Return values
nullptrAlways return null pointer.
See also
rest of AstNode handle functions

Reimplemented from erpcgen::AstWalker.

DataType * SymbolScanner::lookupDataType ( const AstNode typeNode)
protected

This function returns pointer to new type object.

The function returns pointer to new data type object (array, list, alias, ...). Created data type depends on given node token.

Parameters
[in]typeNodeNode, which data type is searched.
Returns
Return new data type.
See also
DataType * SymbolScanner::createListType(const AstNode * typeNode, const std::string &name)
DataType * SymbolScanner::createArrayType(const AstNode * typeNode, const std::string &name)
DataType * SymbolScanner::lookupDataTypeByName(const Token * tok, const std::string &name)
Exceptions
internal_errorThrown if given ast node has not token type: TOK_IDENT, TOK_LIST, TOK_ARRAY.
DataType * SymbolScanner::lookupDataTypeByName ( const Token tok,
SymbolScope scope,
bool  recursive = true 
)
protected

This function returns pointer to new type object.

The function returns pointer to new type object, which can be simple data type or alias.

Parameters
[in]tokToken with data type name.
[in]scopeScope determines searching area.
[in]recursiveRecursive searching given scope.
Returns
Return data type, which is not array or list.
See also
DataType * SymbolScanner::createListType(const AstNode * typeNode, const std::string &name)
DataType * SymbolScanner::createArrayType(const AstNode * typeNode, const std::string &name)
Exceptions
semantic_errorThrown if given token has not name located in symbol scope variable m_globals.
semantic_errorThrown if given token can not be transformed to data type.
void SymbolScanner::removeForwardDeclaration ( DataType dataType)
protected

This function unregister union/structure declarations.

Parameters
[in]dataTypeUnion/structure data type.
bool SymbolScanner::rhsIsAnExpression ( AstNode rhs)
protected

Determines if the right hand side of a constant declaration is an expression.

Parameters
[in]rhsNode referring to the rhs expression.
Return values
Truewhen given ast node is expression, else false.
bool SymbolScanner::rhsIsAStringLiteral ( AstNode rhs)
protected

Determines if the right hand side of a constant declaration is a string literal.

Parameters
[in]rhsNode referring to the rhs expression.
Return values
Truewhen given ast node is string literal, else false.
void SymbolScanner::scanStructForAnnotations ( )
protected

Controlling annotations used on structure members.

Struct members are examined for and annotations, and the length member is denoted. This function is also used on function parameters, since they are represented as structs.

void SymbolScanner::setParameterDirection ( StructMember param,
AstNode directionNode 
)
protected

set parameter direction: in, out, inout

Parameters
[in]paramCurrent parameter
[in]directionNodeDirection node in AST

Member Data Documentation

AliasType* erpcgen::SymbolScanner::m_currentAlias
protected

Contains pointer to alias when alias is handled.

EnumType* erpcgen::SymbolScanner::m_currentEnum
protected

Contains pointer to enumeration when enumeration is handled.

Interface* erpcgen::SymbolScanner::m_currentInterface
protected

Contains pointer to interface when interface is handled.

Program* erpcgen::SymbolScanner::m_currentProgram
protected

Contains pointer to program when program was set in parsed file.

StructType* erpcgen::SymbolScanner::m_currentStruct
protected

Contains pointer to structure when structure is handled.

UnionType* erpcgen::SymbolScanner::m_currentUnion
protected

Contains pointer to union when union is handled.

std::vector<UnionCase *> erpcgen::SymbolScanner::m_emptyUnionCases
protected

Vector of union cases.

std::map<std::string, DataType *> erpcgen::SymbolScanner::m_forwardDeclarations
protected

To keep forward declarations.

SymbolScope* erpcgen::SymbolScanner::m_globals
protected

SymbolScope contains information about generating data types, functions, and interfaces.


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