public abstract class AbstractScannerExtensionConfiguration extends Object implements IScannerExtensionConfiguration
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractScannerExtensionConfiguration.MacroDefinition |
Constructor and Description |
---|
AbstractScannerExtensionConfiguration() |
Modifier and Type | Method and 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 literals
|
boolean |
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_suffix
|
boolean |
supportUTFLiterals()
Support for UTF string literals.
|
public AbstractScannerExtensionConfiguration()
public boolean support$InIdentifiers()
IScannerExtensionConfiguration
support$InIdentifiers
in interface IScannerExtensionConfiguration
true
, if $ should be supported in identifierspublic boolean supportAtSignInIdentifiers()
supportAtSignInIdentifiers
in interface IScannerExtensionConfiguration
true
, if @ should be supported in identifierspublic boolean supportUTFLiterals()
supportUTFLiterals
in interface IScannerExtensionConfiguration
public boolean supportSlashPercentComments()
supportSlashPercentComments
in interface IScannerExtensionConfiguration
true
, if /% should be interpreted as the start of a block-comment which is
ended by %/public char[] supportAdditionalNumericLiteralSuffixes()
IScannerExtensionConfiguration
supportAdditionalNumericLiteralSuffixes
in interface IScannerExtensionConfiguration
null
, if no additional
suffixes should be allowedpublic boolean supportMinAndMaxOperators()
IScannerExtensionConfiguration
<?
and >?
).supportMinAndMaxOperators
in interface IScannerExtensionConfiguration
true
if support for the extension should be
enabledpublic boolean supportRawStringLiterals()
IScannerExtensionConfiguration
supportRawStringLiterals
in interface IScannerExtensionConfiguration
public boolean supportUserDefinedLiterals()
supportUserDefinedLiterals
in interface IScannerExtensionConfiguration
public boolean supportDigitSeparators()
IScannerExtensionConfiguration
supportDigitSeparators
in interface IScannerExtensionConfiguration
public CharArrayIntMap getAdditionalPreprocessorKeywords()
IScannerExtensionConfiguration
getAdditionalPreprocessorKeywords
in interface IScannerExtensionConfiguration
IPreprocessorDirective
or null
for no additional keywords.public CharArrayIntMap getAdditionalKeywords()
IScannerExtensionConfiguration
getAdditionalKeywords
in interface IScannerExtensionConfiguration
IToken
or null
for no additional keywords.public IMacro[] getAdditionalMacros()
IScannerExtensionConfiguration
getAdditionalMacros
in interface IScannerExtensionConfiguration
null
for no additional macros.protected void addMacro(String signature, String value)
Example: addMacro("max(a,b)", "(((a)>(b) ? (a) : (b))");
signature
- the signature of the macro, see IMacro.getSignature()
.value
- the macro valueprotected void addPreprocessorKeyword(char[] name, int tokenKind)
name
- the name of the keywordtokenKind
- the kind of token the keyword is mapped to. See IToken
.protected void addKeyword(char[] name, int tokenKind)
name
- the name of the keywordtokenKind
- the kind of token the keyword is mapped to. See IToken
.@Deprecated protected static IMacro createMacro(String signature, String value)
addMacro(String, String)
@Deprecated protected static IMacro createFunctionStyleMacro(String name, String value, String[] arguments)
addMacro(String, String)
@Deprecated public boolean initializeMacroValuesTo1()
IScannerExtensionConfiguration.initializeMacroValuesTo1()
initializeMacroValuesTo1
in interface IScannerExtensionConfiguration
Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.