| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getTargetCharLiteralFromANTLRCharLiteral(CodeGenerator generator, String literal)
Overrides org. |
| public String | getTokenTypeAsTargetLabel(CodeGenerator generator, int ttype)
Overrides org. |
| public List | postProcessAction(List<Object> chunks, Token actionToken)
Overrides org. |
| private List | |
| public boolean |
| PythonTarget | back to summary |
|---|---|
| public PythonTarget() | |
| getTargetCharLiteralFromANTLRCharLiteral | back to summary |
|---|---|
| public String getTargetCharLiteralFromANTLRCharLiteral(CodeGenerator generator, String literal) Overrides org. Doc from org. 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.
| |
| getTokenTypeAsTargetLabel | back to summary |
|---|---|
| public String getTokenTypeAsTargetLabel(CodeGenerator generator, int ttype) Overrides org. Target must be able to override the labels used for token types
| |
| postProcessAction | back to summary |
|---|---|
| public List Overrides org. Doc from org. Give target a chance to do some postprocessing on actions. Python for example will have to fix the indention.
| |
| splitLines | back to summary |
|---|---|
| private List | |
| useBaseTemplatesForSynPredFragments | back to summary |
|---|---|
| public boolean useBaseTemplatesForSynPredFragments() Overrides org.
| |