Package org.eclipse.cdt.core.dom.parser
Class AbstractScannerExtensionConfiguration
- java.lang.Object
-
- org.eclipse.cdt.core.dom.parser.AbstractScannerExtensionConfiguration
-
- All Implemented Interfaces:
IScannerExtensionConfiguration
- Direct Known Subclasses:
GNUScannerExtensionConfiguration
public abstract class AbstractScannerExtensionConfiguration extends Object implements IScannerExtensionConfiguration
Abstract scanner extension configuration to help model C/C++ dialects.- Since:
- 4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractScannerExtensionConfiguration.MacroDefinition
-
Constructor Summary
Constructors Constructor Description AbstractScannerExtensionConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
addKeyword(char[] name, int tokenKind)
Adds a keyword to the map of additional keywords.protected void
addMacro(String signature, String value)
Adds a macro to the list of additional macros.protected void
addPreprocessorKeyword(char[] name, int tokenKind)
Adds a preprocessor keyword to the map of additional preprocessor keywords.protected static IMacro
createFunctionStyleMacro(String name, String value, String[] arguments)
Deprecated.protected static IMacro
createMacro(String signature, String value)
Deprecated.CharArrayIntMap
getAdditionalKeywords()
Support for additional keywords.IMacro[]
getAdditionalMacros()
Support for additional macros.CharArrayIntMap
getAdditionalPreprocessorKeywords()
Support for additional preprocessor directives.boolean
initializeMacroValuesTo1()
Deprecated.boolean
support$InIdentifiers()
Support for GNU extension "Dollar Signs in Identifier Names".char[]
supportAdditionalNumericLiteralSuffixes()
Support for additional numeric literal suffix characters, like e.g.boolean
supportAtSignInIdentifiers()
Support for extension "At Signs in Identifier Names".boolean
supportDigitSeparators()
Support for C++14 digit separators in integer literalsboolean
supportMinAndMaxOperators()
Support for (deprecated) GNU minimum and maximum operators (<?
and>?
).boolean
supportRawStringLiterals()
Support for C++ raw string literals.boolean
supportSlashPercentComments()
Support for block-comments comments using /% %/.boolean
supportUserDefinedLiterals()
Support for User Defined Literals such as 123_suffixboolean
supportUTFLiterals()
Support for UTF string literals.
-
-
-
Method Detail
-
support$InIdentifiers
public boolean support$InIdentifiers()
Description copied from interface:IScannerExtensionConfiguration
Support for GNU extension "Dollar Signs in Identifier Names".- Specified by:
support$InIdentifiers
in interfaceIScannerExtensionConfiguration
- Returns:
true
, if $ should be supported in identifiers- See Also:
- "http://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html"
-
supportAtSignInIdentifiers
public boolean supportAtSignInIdentifiers()
Support for extension "At Signs in Identifier Names". If enabled, the '@' sign is treated as part of identifiers.- Specified by:
supportAtSignInIdentifiers
in interfaceIScannerExtensionConfiguration
- Returns:
true
, if @ should be supported in identifiers- Since:
- 5.1
-
supportUTFLiterals
public boolean supportUTFLiterals()
Support for UTF string literals.- Specified by:
supportUTFLiterals
in interfaceIScannerExtensionConfiguration
- Since:
- 5.1
- See Also:
- "http://publib.boulder.ibm.com/infocenter/comphelp/v101v121/index.jsp?topic=/com.ibm.xlcpp101.aix.doc/language_ref/unicode_standard.html"
-
supportSlashPercentComments
public boolean supportSlashPercentComments()
Support for block-comments comments using /% %/.- Specified by:
supportSlashPercentComments
in interfaceIScannerExtensionConfiguration
- Returns:
true
, if /% should be interpreted as the start of a block-comment which is ended by %/- Since:
- 5.1
-
supportAdditionalNumericLiteralSuffixes
public char[] supportAdditionalNumericLiteralSuffixes()
Description copied from interface:IScannerExtensionConfiguration
Support for additional numeric literal suffix characters, like e.g. 'i' and 'j' for GNU Complex number literals.- Specified by:
supportAdditionalNumericLiteralSuffixes
in interfaceIScannerExtensionConfiguration
- Returns:
- an array of chars or
null
, if no additional suffixes should be allowed - See Also:
- "http://gcc.gnu.org/onlinedocs/gcc/Complex.html"
-
supportMinAndMaxOperators
public boolean supportMinAndMaxOperators()
Description copied from interface:IScannerExtensionConfiguration
Support for (deprecated) GNU minimum and maximum operators (<?
and>?
).- Specified by:
supportMinAndMaxOperators
in interfaceIScannerExtensionConfiguration
- Returns:
true
if support for the extension should be enabled- See Also:
- "http://gcc.gnu.org/onlinedocs/gcc/Deprecated-Features.html"
-
supportRawStringLiterals
public boolean supportRawStringLiterals()
Description copied from interface:IScannerExtensionConfiguration
Support for C++ raw string literals.- Specified by:
supportRawStringLiterals
in interfaceIScannerExtensionConfiguration
- Since:
- 5.5
-
supportUserDefinedLiterals
public boolean supportUserDefinedLiterals()
Support for User Defined Literals such as 123_suffix- Specified by:
supportUserDefinedLiterals
in interfaceIScannerExtensionConfiguration
- Since:
- 5.11
-
supportDigitSeparators
public boolean supportDigitSeparators()
Description copied from interface:IScannerExtensionConfiguration
Support for C++14 digit separators in integer literals- Specified by:
supportDigitSeparators
in interfaceIScannerExtensionConfiguration
-
getAdditionalPreprocessorKeywords
public CharArrayIntMap getAdditionalPreprocessorKeywords()
Description copied from interface:IScannerExtensionConfiguration
Support for additional preprocessor directives.- Specified by:
getAdditionalPreprocessorKeywords
in interfaceIScannerExtensionConfiguration
- Returns:
- a mapping of preprocessor directive keyword to one of the
constants defined in
IPreprocessorDirective
ornull
for no additional keywords.
-
getAdditionalKeywords
public CharArrayIntMap getAdditionalKeywords()
Description copied from interface:IScannerExtensionConfiguration
Support for additional keywords.- Specified by:
getAdditionalKeywords
in interfaceIScannerExtensionConfiguration
- Returns:
- a mapping of keyword name to one of the constants defined in
IToken
ornull
for no additional keywords.
-
getAdditionalMacros
public IMacro[] getAdditionalMacros()
Description copied from interface:IScannerExtensionConfiguration
Support for additional macros.- Specified by:
getAdditionalMacros
in interfaceIScannerExtensionConfiguration
- Returns:
- an array of macros or
null
for no additional macros.
-
addMacro
protected void addMacro(String signature, String value)
Adds a macro to the list of additional macros. The macro can either be of object- or of function-style.Example: addMacro("max(a,b)", "(((a)>(b) ? (a) : (b))");
- Parameters:
signature
- the signature of the macro, seeIMacro.getSignature()
.value
- the macro value- Since:
- 5.1
-
addPreprocessorKeyword
protected void addPreprocessorKeyword(char[] name, int tokenKind)
Adds a preprocessor keyword to the map of additional preprocessor keywords.- Parameters:
name
- the name of the keywordtokenKind
- the kind of token the keyword is mapped to. SeeIToken
.- Since:
- 5.1
-
addKeyword
protected void addKeyword(char[] name, int tokenKind)
Adds a keyword to the map of additional keywords.- Parameters:
name
- the name of the keywordtokenKind
- the kind of token the keyword is mapped to. SeeIToken
.- Since:
- 5.1
-
createMacro
@Deprecated protected static IMacro createMacro(String signature, String value)
Deprecated.
-
createFunctionStyleMacro
@Deprecated protected static IMacro createFunctionStyleMacro(String name, String value, String[] arguments)
Deprecated.
-
initializeMacroValuesTo1
@Deprecated public boolean initializeMacroValuesTo1()
Deprecated.- Specified by:
initializeMacroValuesTo1
in interfaceIScannerExtensionConfiguration
-
-