Package org.antlr.v4.codegen.target
Class JavaScriptTarget
- java.lang.Object
-
- org.antlr.v4.codegen.Target
-
- org.antlr.v4.codegen.target.JavaScriptTarget
-
public class JavaScriptTarget extends Target
-
-
Field Summary
Fields Modifier and Type Field Description protected static HashSet<String>
reservedWords
Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar-
Fields inherited from class org.antlr.v4.codegen.Target
defaultCharValueEscape, gen
-
-
Constructor Summary
Constructors Constructor Description JavaScriptTarget(CodeGenerator gen)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getInlineTestSetWordSize()
How many bits should be used to do inline token type tests? Java assumes a 64-bit word for bitsets.protected Set<String>
getReservedWords()
boolean
isATNSerializedAsInts()
boolean
supportsOverloadedMethods()
boolean
wantsBaseListener()
boolean
wantsBaseVisitor()
-
Methods inherited from class org.antlr.v4.codegen.Target
addEscapedChar, addEscapedChar, appendUnicodeEscapedCodePoint, encodeInt16AsCharEscape, escapeChar, escapeIfNeeded, escapeWord, genFile, getAltLabelContextStructName, getBaseListenerFileName, getBaseVisitorFileName, getCodeGenerator, getElementListName, getElementName, getImplicitRuleLabel, getImplicitSetLabel, getImplicitTokenLabel, getLanguage, getListenerFileName, getListLabel, getLoopCounter, getLoopLabel, getRecognizerFileName, getRuleFunctionContextStructName, getRuleFunctionContextStructName, getSerializedATNSegmentLimit, getTargetCharValueEscape, getTargetStringLiteralFromANTLRStringLiteral, getTargetStringLiteralFromANTLRStringLiteral, getTargetStringLiteralFromString, getTargetStringLiteralFromString, getTemplates, getTokenTypeAsTargetLabel, getTokenTypesAsTargetLabels, getVersion, getVisitorFileName, grammarSymbolCausesIssueInGeneratedCode, loadTemplates, needsHeader, shouldUseUnicodeEscapeForCodePointInDoubleQuotedString, templatesExist, visibleGrammarSymbolCausesIssueInGeneratedCode
-
-
-
-
Constructor Detail
-
JavaScriptTarget
public JavaScriptTarget(CodeGenerator gen)
-
-
Method Detail
-
getReservedWords
protected Set<String> getReservedWords()
- Specified by:
getReservedWords
in classTarget
-
getInlineTestSetWordSize
public int getInlineTestSetWordSize()
Description copied from class:Target
How many bits should be used to do inline token type tests? Java assumes a 64-bit word for bitsets. Must be a valid wordsize for your target like 8, 16, 32, 64, etc...- Overrides:
getInlineTestSetWordSize
in classTarget
-
wantsBaseListener
public boolean wantsBaseListener()
- Overrides:
wantsBaseListener
in classTarget
-
wantsBaseVisitor
public boolean wantsBaseVisitor()
- Overrides:
wantsBaseVisitor
in classTarget
-
supportsOverloadedMethods
public boolean supportsOverloadedMethods()
- Overrides:
supportsOverloadedMethods
in classTarget
-
isATNSerializedAsInts
public boolean isATNSerializedAsInts()
- Overrides:
isATNSerializedAsInts
in classTarget
-
-