tfel
Loading...
Searching...
No Matches
tfel::utilities::CxxTokenizer Struct Reference

class in charge of reading a C++-style file and converting it in tokens. More...

#include </home/runner/work/tfel/tfel/include/TFEL/Utilities/CxxTokenizer.hxx>

Inheritance diagram for tfel::utilities::CxxTokenizer:
tfel::utilities::CxxTokenizerOptions mfront::DSLBase mtest::SchemeParserBase tfel::check::TestLauncher tfel::utilities::ParserBase mfront::BehaviourDSLCommon mfront::MaterialPropertyDSL mfront::ModelDSLCommon mtest::SingleStructureSchemeParser tfel::utilities::ConfigParser tfel::utilities::TestDocParser mfront::BehaviourDSLBase< DefaultDSLBase > mfront::BehaviourDSLBase< ImplicitDSLBase > mfront::BehaviourDSLBase< IsotropicBehaviourDSLBase > mfront::BehaviourDSLBase< RungeKuttaDSLBase > mfront::BehaviourDSLBase< Child > mfront::ModelDSLBase< ModelDSL > mfront::ModelDSLBase< Child > mtest::MTestParser mtest::PipeTestParser

Classes

struct  IsValidIdentifierOptions
 options used to parse an identifier More...

Public Types

using TokensContainer = std::vector<Token>
 a simple alias
using const_iterator = TokensContainer::const_iterator
 a simple alias
using size_type = TokensContainer::size_type
 a simple alias

Public Member Functions

 CxxTokenizer ()
 default constructor
 CxxTokenizer (const CxxTokenizerOptions &)
 constructor with options
 CxxTokenizer (const std::string &)
 constructor from a file
 CxxTokenizer (const std::string &, const CxxTokenizerOptions &)
 constructor from a file
template<typename InputIterator>
void import (const InputIterator, const InputIterator)
 import the specified tokens
void parseString (const std::string &)
 analyse the string given all previous tokens are erased
void openFile (const std::string &)
 import the specified file
void printFileTokens (std::ostream &) const
 print the stored tokens to the specified stream
void setCStyleCommentOpened (const bool)
 assume that a C-style comment was opened at the beginning of the processing. This is usefull when parsing a file line by line
bool isCStyleCommentOpened () const
void setRawStringOpened (const bool)
 assume that a raw string was opened at the beginning of the processing.
void setRawStringDelimiter (std::string_view)
 set the raw string deliminter. This assume that a raw string was opened at the beginning of the processing, i.e. sets the rawStringOpened boolean to true.
bool isRawStringOpened () const
std::string getCurrentRawStringDelimiter () const noexcept
void stripComments ()
 remove all comment tokens
void clear ()
 clear the object
void treatCharAsString (const bool)
 set if char tokens shall be treated as string tokens
void keepCommentBoundaries (const bool)
 set if the comment boundaries must be left in the resulting tokens.
void treatDotAsSeparator (const bool)
 set if '.' shall be treated as as sperator
void treatPlusAsSeparator (const bool)
 set if '+' shall be treated as as sperator
void treatMinusAsSeparator (const bool)
 set if '-' shall be treated as as sperator
void mergeStrings (const bool)
 set if successive strings shall be merged
void extractNumbers (const bool)
 set if tokens shall be split to extract numbers
void addSeparator (const std::string &)
 add a new separator
void substitute (const std::map< std::string, std::string > &)
 apply the given substitutions by calling replace_all on the values hold by the standard and string tokens.
bool empty () const
const_iterator begin () const
const_iterator end () const
const_iterator cbegin () const
const_iterator cend () const
const Token & operator[] (const size_type) const
size_type size () const
virtual ~CxxTokenizer ()
 destructor

Static Public Member Functions

static bool isValidIdentifier (std::string_view, const IsValidIdentifierOptions &)
static bool isValidIdentifier (std::string_view, const bool=true)
static void checkNotEndOfLine (const std::string &, const_iterator &, const const_iterator)
 an helper method throwing an exception if the given iterator is egal to the third argument (which shall point after the last token of the line)
static void checkNotEndOfLine (const std::string &, const std::string &, const_iterator &, const const_iterator)
 an helper method throwing an exception if the given iterator is egal to the fourth argument (which shall point after the last token of the line)
static void readSpecifiedToken (const std::string &, const std::string &, const_iterator &, const const_iterator)
 an helper method throwing an exception if the given iterator is egal to the fourth argument (which shall point after the last token of the line) or if the given token is not equal to the expected value
static unsigned int readUnsignedInt (const_iterator &, const const_iterator)
 an helper method to extract an unsigned int from the given token
static std::string readString (const_iterator &, const const_iterator)
 an helper method to extract a string from the given token
static std::vector< std::string > readArray (const std::string &, const_iterator &, const const_iterator)
 an helper method to extract a set of values from the given as an array
static void readArray (const std::string &, std::vector< std::string > &, const_iterator &, const const_iterator)
 an helper method to extract a set of values from the given as an array
static std::vector< Token > readList (const std::string &, const std::string &, const std::string &, const_iterator &, const const_iterator)
 extract a list of token
static void readList (std::vector< Token > &, const std::string &, const std::string &, const std::string &, const_iterator &, const const_iterator)
 extract a list of token
static std::vector< std::string > readStringArray (const_iterator &, const const_iterator)
 an helper method to extract a set of values from the given as an array
static double readDouble (const_iterator &, const const_iterator)
 an helper method to extract a double from the given token
static int readInt (const_iterator &, const const_iterator)
 an helper method to extract a int from the given token

Protected Member Functions

virtual void parseStream (std::istream &, Token::size_type &, const std::string &)
 tokenize the lines of a stream
virtual void splitLine (const std::string &, const Token::size_type)
virtual void parseChar (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type)
virtual void parseString (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type, const char)
virtual void parseCComment (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type)
virtual void parseCxxComment (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type)
virtual void try_join (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type, const char)
virtual void try_join (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type, const char, const char)
virtual void parseNumber (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type)
 read a number
virtual void parsePreprocessorDirective (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const std::string::const_iterator, const Token::size_type)
virtual void parseStandardLine (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const std::string::const_iterator, const Token::size_type)
virtual void parseRawString (Token::size_type &, std::string::const_iterator &, const std::string::const_iterator, const Token::size_type, const Token::size_type)
 read the contents of a raw string literal, which starts at the current iterator, past the opening R"delim( prefix
Protected Member Functions inherited from tfel::utilities::CxxTokenizerOptions
 CxxTokenizerOptions ()
 default constructor
 CxxTokenizerOptions (const CxxTokenizerOptions &)
 copy constructor
 CxxTokenizerOptions (CxxTokenizerOptions &&) noexcept
 move constructor
CxxTokenizerOptions & operator= (const CxxTokenizerOptions &)
 standard assignement
CxxTokenizerOptions & operator= (CxxTokenizerOptions &&) noexcept
 move assignement
 ~CxxTokenizerOptions ()
 destructor

Static Protected Member Functions

static bool isValidFunctionIdentifier (const std::string &, const bool=true)

Protected Attributes

std::vector< std::string > additional_separators
TokensContainer tokens
 list of tokens read
std::map< Token::size_type, std::string > comments
 store the comments which have been removed by the stripComments method. The key of the map is the line a comment starts on and the value is the values of the comments of this line, in the order they appear in the line, separated by a space character.
bool cStyleCommentOpened = false
 if true, a cStyle comment what opened when the last line treatment was finised
bool rawStringOpened = false
std::string currentRawStringDelimiter
 name of the current delimiter for a raw string
Protected Attributes inherited from tfel::utilities::CxxTokenizerOptions
bool bKeepCommentBoundaries = false
 if true, keep the comment boundaries
bool shallMergeStrings = false
 if true, successive strings are merged
bool allowStrayHashCharacter = false
 allow stray hash character
bool treatHashCharacterAsCommentDelimiter = false
 the hash character can start a comment, as in python, shell, etc..
bool allowStrayBackSlash = false
 allow stray backslash
bool treatPreprocessorDirectives = true
 treat preprocessor directives
bool treatStrings = true
 treat strings and characters If false, the ' and '"' are treated as indivdual tokens
bool treatNumbers = true
 extract number
bool treatCComments = true
 treat comments
bool treatCxxComments = true
 treat comments
bool joinCxxTwoCharactersSeparators = true
bool graveAccentAsSeparator = true
 strings and characters
bool charAsString = false
bool dotAsSeparator = true
 treat . as a separator
bool plusAsSeparator = true
 treat + as a separator
bool minusAsSeparator = true
 treat - as a separator
bool addCurlyBraces = false
 add curly braces at the beginning and at the end of the file

Detailed Description

class in charge of reading a C++-style file and converting it in tokens.

The value of a number token does not hold the digit separators of the C++14 integer literals: @IterMax 1'000; gives the number token 1000, whose value is therefore not the substring of the line taken at the offset of this token. The offsets of the tokens remain those of the file, whatever the numbers which precede them, so that a source code can be rewritten from the offsets of its tokens, as the MFront interfaces for Abaqus, Aster and CalculiX do.

Constructor & Destructor Documentation

◆ CxxTokenizer() [1/3]

tfel::utilities::CxxTokenizer::CxxTokenizer ( const CxxTokenizerOptions & )
explicit

constructor with options

Parameters
[in]ooptions

◆ CxxTokenizer() [2/3]

tfel::utilities::CxxTokenizer::CxxTokenizer ( const std::string & )
explicit

constructor from a file

Parameters
[in]f: file name

◆ CxxTokenizer() [3/3]

tfel::utilities::CxxTokenizer::CxxTokenizer ( const std::string & ,
const CxxTokenizerOptions &  )

constructor from a file

Parameters
[in]f: file name
[in]ooptions

Member Function Documentation

◆ addSeparator()

void tfel::utilities::CxxTokenizer::addSeparator ( const std::string & )

add a new separator

Parameters
[in]sseparator

◆ begin()

const_iterator tfel::utilities::CxxTokenizer::begin ( ) const
nodiscard
Returns
an iterator to the first token

◆ cbegin()

const_iterator tfel::utilities::CxxTokenizer::cbegin ( ) const
nodiscard
Returns
an iterator to the first token

◆ cend()

const_iterator tfel::utilities::CxxTokenizer::cend ( ) const
nodiscard
Returns
an iterator past the last token

◆ checkNotEndOfLine() [1/2]

void tfel::utilities::CxxTokenizer::checkNotEndOfLine ( const std::string & ,
const std::string & ,
const_iterator & ,
const const_iterator  )
static

an helper method throwing an exception if the given iterator is egal to the fourth argument (which shall point after the last token of the line)

Parameters
[in]method: calling method name
[in]error: error message
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line
Exceptions
std::runtime_errorif the given iterator is egal to the fourth argument

◆ checkNotEndOfLine() [2/2]

void tfel::utilities::CxxTokenizer::checkNotEndOfLine ( const std::string & ,
const_iterator & ,
const const_iterator  )
static

an helper method throwing an exception if the given iterator is egal to the third argument (which shall point after the last token of the line)

Parameters
[in]method: calling method name
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line
Exceptions
std::runtime_errorif the given iterator is egal to the third argument

◆ empty()

bool tfel::utilities::CxxTokenizer::empty ( ) const
nodiscard
Returns
true if the token list is empty

◆ end()

const_iterator tfel::utilities::CxxTokenizer::end ( ) const
nodiscard
Returns
an iterator past the last token

◆ extractNumbers()

void tfel::utilities::CxxTokenizer::extractNumbers ( const bool )

set if tokens shall be split to extract numbers

Parameters
[in]b: boolean telling numbers shall be extracted from tokens

◆ getCurrentRawStringDelimiter()

std::string tfel::utilities::CxxTokenizer::getCurrentRawStringDelimiter ( ) const
nodiscardnoexcept
Returns
the current raw string delimiter. This is usefull when parsing a file line by line

◆ import()

template<typename InputIterator>
void tfel::utilities::CxxTokenizer::import ( const InputIterator p,
const InputIterator pe )

import the specified tokens

Parameters
[in]p: iterator to the first token
[in]pe: iterator past the last token

◆ isCStyleCommentOpened()

bool tfel::utilities::CxxTokenizer::isCStyleCommentOpened ( ) const
nodiscard
Returns
is a C-style comment is opened at the the end of the processing. This is usefull when parsing a file line by line

A C style comment may span several lines: a comment which is not closed on the line where it opens does not make the tokenizer throw. The state of the tokenizer is left open and the lines which follow are gathered in the value of the comment token until the comment is closed, which is what allows tokenizing a file line by line. A file which ends inside a comment is thus accepted, on the contrary to a quoted string or to a character literal which are rejected when they are not closed in their line: the caller is responsible for checking the state of the tokenizer when the end of the file is reached, as this method does. See issue #1395.

◆ isRawStringOpened()

bool tfel::utilities::CxxTokenizer::isRawStringOpened ( ) const
nodiscard
Returns
is a raw string is opened at the the end of the processing. This is usefull when parsing a file line by line

The raw string literals behave as the C style comments: a literal which is not closed when the end of the contents is reached does not make the tokenizer throw and leaves the state of the tokenizer open. A file which ends inside a raw string literal is thus accepted: the caller is responsible for checking the state of the tokenizer when the end of the file is reached, as this method does, getCurrentRawStringDelimiter giving the delimiter of the opened literal. See issue #1395.

◆ isValidIdentifier() [1/2]

bool tfel::utilities::CxxTokenizer::isValidIdentifier ( std::string_view ,
const bool = true )
static
Returns
true if the given string is a valid variable name.
Parameters
[in]s: variable name
[in]b: boolean telling if C++ keywords are allowed.

◆ isValidIdentifier() [2/2]

bool tfel::utilities::CxxTokenizer::isValidIdentifier ( std::string_view ,
const IsValidIdentifierOptions &  )
static
Returns
true if the given string is a valid variable name.
Parameters
[in]s: variable name
[in]opts: options

◆ keepCommentBoundaries()

void tfel::utilities::CxxTokenizer::keepCommentBoundaries ( const bool )

set if the comment boundaries must be left in the resulting tokens.

Parameters
[in]b: boolean telling if char tokens shall be treated as string tokens

◆ mergeStrings()

void tfel::utilities::CxxTokenizer::mergeStrings ( const bool )

set if successive strings shall be merged

Parameters
[in]b: boolean

◆ openFile()

void tfel::utilities::CxxTokenizer::openFile ( const std::string & )

import the specified file

Parameters
[in]f: file name

◆ operator[]()

const Token & tfel::utilities::CxxTokenizer::operator[] ( const size_type ) const
nodiscard
Returns
the ith token
Parameters
[in]i: index
Exceptions
anexception if i>=this->size()

◆ parseNumber()

virtual void tfel::utilities::CxxTokenizer::parseNumber ( Token::size_type & ,
std::string::const_iterator & ,
const std::string::const_iterator ,
const Token::size_type  )
protectedvirtual

read a number

The digit separators of the C++14 integer literals are removed from the value of the token: 1'000 gives the value 1000, see the description of the class.

Parameters
[in,out]ooffset in the line
[in,out]piterator to the current character
[in]peiterator past the end of the line
[in]nline number

◆ parseRawString()

virtual void tfel::utilities::CxxTokenizer::parseRawString ( Token::size_type & ,
std::string::const_iterator & ,
const std::string::const_iterator ,
const Token::size_type ,
const Token::size_type  )
protectedvirtual

read the contents of a raw string literal, which starts at the current iterator, past the opening R"delim( prefix

The value of the token holds the whole literal, from the R delimiter to the closing " included, as for a quoted string, and its offset is that of the R, see issue #1390. The opening prefix is restored from the delimiter of the literal, which the caller has read and kept in currentRawStringDelimiter.

Parameters
[in,out]ocurrent offset in line
[in,out]pcurrent iterator
[in]peiterator past the last character in the line
[in]ncurrent line number
[in]rooffset of the R which opens the literal

◆ parseStream()

virtual void tfel::utilities::CxxTokenizer::parseStream ( std::istream & ,
Token::size_type & ,
const std::string &  )
protectedvirtual

tokenize the lines of a stream

The lines are tokenized from the current position of the stream and n is increased by the number of lines which have been tokenized. The last line of a stream may not be terminated by an end of line character: such a line is tokenized as the others. On the contrary, an end of line character at the very end of a stream does not introduce an additional empty line, so that tokenizing a stream gives the same tokens as tokenizing its contents line by line, up to the line numbers, which are those of the stream.

Parameters
[in]ininput stream
[in,out]nline number
[in]fromorigin of the stream

◆ parseString()

void tfel::utilities::CxxTokenizer::parseString ( const std::string & )

analyse the string given all previous tokens are erased

The line numbers of the tokens of the string start at the first line: tokenizing a file with several calls to this method, a call per line, gives the same tokens as tokenizing its whole contents with a single call, but the lines of those tokens are those of the line the call is given. A caller who wants to keep the line numbering of a file shall use the parseStream method, which takes the current line number as an argument.

Parameters
[in]s: string to be parsed

◆ printFileTokens()

void tfel::utilities::CxxTokenizer::printFileTokens ( std::ostream & ) const

print the stored tokens to the specified stream

Parameters
[out]out: output stream

◆ readArray() [1/2]

std::vector< std::string > tfel::utilities::CxxTokenizer::readArray ( const std::string & ,
const_iterator & ,
const const_iterator  )
static

an helper method to extract a set of values from the given as an array

Parameters
[in]method: calling method name
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line
Exceptions
std::runtime_errorif the given iterator is egal to the second argument or if the given token is not a string

◆ readArray() [2/2]

void tfel::utilities::CxxTokenizer::readArray ( const std::string & ,
std::vector< std::string > & ,
const_iterator & ,
const const_iterator  )
static

an helper method to extract a set of values from the given as an array

Parameters
[in]method: calling method name
[out]v: the extracted array
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line
Exceptions
std::runtime_errorif the given iterator is egal to the second argument or if the given token is not a string

◆ readDouble()

double tfel::utilities::CxxTokenizer::readDouble ( const_iterator & ,
const const_iterator  )
static

an helper method to extract a double from the given token

Parameters
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line
Returns
the extracted value
Exceptions
std::runtime_errorif the given iterator is egal to the second argument

◆ readInt()

int tfel::utilities::CxxTokenizer::readInt ( const_iterator & ,
const const_iterator  )
static

an helper method to extract a int from the given token

Parameters
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line
Returns
the extracted value
Exceptions
std::runtime_errorif the given iterator is egal to the second argument

◆ readList() [1/2]

std::vector< Token > tfel::utilities::CxxTokenizer::readList ( const std::string & ,
const std::string & ,
const std::string & ,
const_iterator & ,
const const_iterator  )
static

extract a list of token

Parameters
[in]m: calling method name (used for error message)
[in]db: beginning delimiter
[in]de: end delimiter
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line

◆ readList() [2/2]

void tfel::utilities::CxxTokenizer::readList ( std::vector< Token > & ,
const std::string & ,
const std::string & ,
const std::string & ,
const_iterator & ,
const const_iterator  )
static

extract a list of token

Parameters
[out]l: list read
[in]m: calling method name (used for error message)
[in]db: beginning delimiter
[in]de: end delimiter
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line

◆ readSpecifiedToken()

void tfel::utilities::CxxTokenizer::readSpecifiedToken ( const std::string & ,
const std::string & ,
const_iterator & ,
const const_iterator  )
static

an helper method throwing an exception if the given iterator is egal to the fourth argument (which shall point after the last token of the line) or if the given token is not equal to the expected value

Parameters
[in]method: calling method name
[in]value: expected value
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line
Exceptions
std::runtime_errorif the given iterator is egal to the fourth argument

◆ readString()

std::string tfel::utilities::CxxTokenizer::readString ( const_iterator & ,
const const_iterator  )
static

an helper method to extract a string from the given token

Parameters
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line
Returns
the extracted value
Exceptions
std::runtime_errorif the given iterator is egal to the second argument or if the given token is not a string

◆ readStringArray()

std::vector< std::string > tfel::utilities::CxxTokenizer::readStringArray ( const_iterator & ,
const const_iterator  )
static

an helper method to extract a set of values from the given as an array

Parameters
[out]v: the extracted array
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line
Exceptions
std::runtime_errorif the given iterator is egal to the second argument or if the given token is not a string

◆ readUnsignedInt()

unsigned int tfel::utilities::CxxTokenizer::readUnsignedInt ( const_iterator & ,
const const_iterator  )
static

an helper method to extract an unsigned int from the given token

Parameters
[in]p: iterator to the current token
[in]pe: iterator pointing after the last token of the line
Returns
the extracted value
Exceptions
std::runtime_errorif the given iterator is egal to the second argument

◆ setCStyleCommentOpened()

void tfel::utilities::CxxTokenizer::setCStyleCommentOpened ( const bool )

assume that a C-style comment was opened at the beginning of the processing. This is usefull when parsing a file line by line

Parameters
[in]bboolean

◆ setRawStringDelimiter()

void tfel::utilities::CxxTokenizer::setRawStringDelimiter ( std::string_view )

set the raw string deliminter. This assume that a raw string was opened at the beginning of the processing, i.e. sets the rawStringOpened boolean to true.

Parameters
[in]dnew delimiter
Note
the raw string delimiter is set empty.

◆ setRawStringOpened()

void tfel::utilities::CxxTokenizer::setRawStringOpened ( const bool )

assume that a raw string was opened at the beginning of the processing.

This is usefull when parsing a file line by line

Parameters
[in]bboolean
Note
the raw string delimiter is set empty.

◆ size()

size_type tfel::utilities::CxxTokenizer::size ( ) const
nodiscard
Returns
the number of token

◆ splitLine()

virtual void tfel::utilities::CxxTokenizer::splitLine ( const std::string & ,
const Token::size_type  )
protectedvirtual
Parameters
[in]lline
[in]nline number
[in]fromorigin of the stream

◆ stripComments()

void tfel::utilities::CxxTokenizer::stripComments ( )

remove all comment tokens

The values of the removed comments of the kind Token::Comment are gathered in the comments data member: a line may hold several such comments, which are gathered in the order they appear in the line, separated by a space character.

◆ substitute()

void tfel::utilities::CxxTokenizer::substitute ( const std::map< std::string, std::string > & )

apply the given substitutions by calling replace_all on the values hold by the standard and string tokens.

Parameters
[in]substitutionslist of substitutions

◆ treatCharAsString()

void tfel::utilities::CxxTokenizer::treatCharAsString ( const bool )

set if char tokens shall be treated as string tokens

Parameters
[in]b: boolean telling if char tokens shall be treated as string tokens

◆ treatDotAsSeparator()

void tfel::utilities::CxxTokenizer::treatDotAsSeparator ( const bool )

set if '.' shall be treated as as sperator

Parameters
[in]b: boolean telling if '.' shall be treated as as sperator

◆ treatMinusAsSeparator()

void tfel::utilities::CxxTokenizer::treatMinusAsSeparator ( const bool )

set if '-' shall be treated as as sperator

Parameters
[in]b: boolean telling if '-' shall be treated as as separator

◆ treatPlusAsSeparator()

void tfel::utilities::CxxTokenizer::treatPlusAsSeparator ( const bool )

set if '+' shall be treated as as sperator

Parameters
[in]b: boolean telling if '+' shall be treated as as separator

Member Data Documentation

◆ comments

std::map<Token::size_type, std::string> tfel::utilities::CxxTokenizer::comments
protected

store the comments which have been removed by the stripComments method. The key of the map is the line a comment starts on and the value is the values of the comments of this line, in the order they appear in the line, separated by a space character.

The empty comments, that is a // comment or a C style comment whose contents is empty, bring nothing and are then not stored: a line whose only comment is empty gives no entry in this map.

◆ rawStringOpened

bool tfel::utilities::CxxTokenizer::rawStringOpened = false
protected

if true, a cStyle comment what opened when the last line treatment was finised


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