Top Fields Constructors Methods
org.antlr.codegen

public Class Perl5Target

extends Target
Class Inheritance
Imports
org.antlr.analysis.Label, org.antlr.tool.AttributeScope, .Grammar, .RuleLabelScope

Field Summary

Inherited from org.antlr.codegen.Target:
targetCharValueEscape

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
public String
getTargetCharLiteralFromANTLRCharLiteral(final CodeGenerator generator, final String literal)

Overrides org.antlr.codegen.Target.getTargetCharLiteralFromANTLRCharLiteral.

Convert from an ANTLR char literal found in a grammar file to an equivalent char literal in the target language.
Inherited from org.antlr.codegen.Target:
genRecognizerFilegenRecognizerHeaderFilegetMaxCharValuegetTarget64BitStringFromValuegetTargetStringLiteralFromANTLRStringLiteralgetTargetStringLiteralFromStringgetTargetStringLiteralFromStringgetTokenTypeAsTargetLabelisValidActionScopeperformGrammarAnalysispostProcessActionuseBaseTemplatesForSynPredFragments

Constructor Detail

Perl5Targetback to summary
public Perl5Target()

Method Detail

encodeIntAsCharEscapeback to summary
public String encodeIntAsCharEscape(final int v)

Overrides org.antlr.codegen.Target.encodeIntAsCharEscape.

Annotations
@Override
getTargetCharLiteralFromANTLRCharLiteralback to summary
public String getTargetCharLiteralFromANTLRCharLiteral(final CodeGenerator generator, final String literal)

Overrides org.antlr.codegen.Target.getTargetCharLiteralFromANTLRCharLiteral.

Doc from org.antlr.codegen.Target.getTargetCharLiteralFromANTLRCharLiteral.

Convert from an ANTLR char literal found in a grammar file to an equivalent char literal in the target language. For most languages, this means leaving 'x' as 'x'. Actually, we need to escape ' ' so that it doesn't get converted to \n by the compiler. Convert the literal to the char value and then to an appropriate target char literal. Expect single quotes around the incoming literal.

Annotations
@Override