Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::TextInput::Settings Class Reference

Tokenizer configuration options. More...

#include <TextInput.h>

List of all members.

Public Member Functions

 Settings ()

Public Attributes

bool caseSensitive
bool cComments
bool cppComments
bool escapeSequencesInStrings
Set< std::string > falseSymbols
bool msvcSpecials
char otherCommentCharacter
char otherCommentCharacter2
bool signedNumbers
bool singleQuotedStrings
std::string sourceFileName
int startingLineNumberOffset
Set< std::string > trueSymbols


Detailed Description

Tokenizer configuration options.


Constructor & Destructor Documentation

G3D::TextInput::Settings::Settings (  ) 


Member Data Documentation

When parsing booleans and msvcSpecials, is case significant? Default is true.

If true, slash-star marks a multi-line comment.

Default is true.

If true, // begins a single line comment.

Default is true.

If true, ,
, , , \ and other escape sequences inside strings are converted to the equivalent C++ escaped character.

If false, backslashes are treated literally. It is convenient to set to false if reading Windows paths, for example, like c:.

Default is true.

See trueSymbols.

Default is {false}

Parse -1.

IND00 as the floating point number returned by nan(), -1.INF00 as -inf(), and 1.INF00 as inf(). Note that the C99 standard specifies that a variety of formats like "NaN" and "nan" are to be used; these are easier to parse yourself and not currently supported by readNumber.

An alternative to specifying msvcSpecials is to read numbers as:

            Token x = t.read();
            Token y = t.peek();
            if ((x.string() == "-1.") && 
                (y.string() == "#INF00") && 
                (y.character() == x.character() + 3) &&
                (y.line() == x.line()) {
                t.read();
                return nan();
            }
... similar cases for inf
          

If the single-comment character was #, the floating point special format overrides the comment and will be parsed instead.

If signedNumbers is false msvcSpecials will not be parsed.

Default is true.

If non-NUL, specifies a character that begins single line comments ('#' and '' are popular choices).

This is independent of the cppComments flag. If the character appears in text with a backslash in front of it, it is considered escaped and is not treated as a comment character.

Default is ''.

Another (optional) 1-comment character.

Useful for files that support multiple comment syntaxes. Default is ''.

If true, "-1" parses as the number -1 instead of the symbol "-" followed by the number 1.

Default is true.

If true, strings can be marked with single quotes (e.g., 'aaa').

If false, the quote character is parsed as a symbol. Default is true. Backquote (`) is always parsed as a symbol.

If set to a non-empty string, that string will be used in place of the real file name (or in place of a pseudonym constructed from the buffer if given FROM_STRING) in tokens and exceptions.

Default is empty.

Added to the line number reported by peekLineNumber and in exceptions.

Useful for concatenating files that are parsed separately. Default is zero.

All symbols that will become the 'true' boolean token.

See also caseSensitive. Clear this value to disable parsing of true booleans.

Default is {true}.


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:48 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo