| java.lang.Object org.antlr.codegen.Target org.antlr.codegen.CTarget
Method Summary | |
protected StringTemplate | chooseWhereCyclicDFAsGo(Tool tool, CodeGenerator generator, Grammar grammar, StringTemplate recognizerST, StringTemplate cyclicDFAST) | protected void | genRecognizerFile(Tool tool, CodeGenerator generator, Grammar grammar, StringTemplate outputFileST) | protected void | genRecognizerHeaderFile(Tool tool, CodeGenerator generator, Grammar grammar, StringTemplate headerFileST, String extName) | public String | getTargetCharLiteralFromANTLRCharLiteral(CodeGenerator generator, String literal) | public String | getTargetStringLiteralFromANTLRStringLiteral(CodeGenerator generator, String literal) Convert from an ANTLR string literal found in a grammar file to
an equivalent string literal in the C target.
Because we msut support Unicode character sets and have chosen
to have the lexer match UTF32 characters, then we must encode
string matches to use 32 bit character arrays. | public boolean | isValidActionScope(int grammarType, String scope) Is scope in @scope::name {action} valid for this kind of grammar?
Targets like C++ may want to allow new scopes like headerfile or
some such. |
chooseWhereCyclicDFAsGo | protected StringTemplate chooseWhereCyclicDFAsGo(Tool tool, CodeGenerator generator, Grammar grammar, StringTemplate recognizerST, StringTemplate cyclicDFAST)(Code) | | |
getTargetStringLiteralFromANTLRStringLiteral | public String getTargetStringLiteralFromANTLRStringLiteral(CodeGenerator generator, String literal)(Code) | | Convert from an ANTLR string literal found in a grammar file to
an equivalent string literal in the C target.
Because we msut support Unicode character sets and have chosen
to have the lexer match UTF32 characters, then we must encode
string matches to use 32 bit character arrays. Here then we
must produce the C array and cater for the case where the
lexer has been eoncded with a string such as "xyz\n", which looks
slightly incogrous to me but is not incorrect.
|
isValidActionScope | public boolean isValidActionScope(int grammarType, String scope)(Code) | | Is scope in @scope::name {action} valid for this kind of grammar?
Targets like C++ may want to allow new scopes like headerfile or
some such. The action names themselves are not policed at the
moment so targets can add template actions w/o having to recompile
ANTLR.
|
Methods inherited from org.antlr.codegen.Target | protected void genRecognizerFile(Tool tool, CodeGenerator generator, Grammar grammar, StringTemplate outputFileST) throws IOException(Code)(Java Doc) protected void genRecognizerHeaderFile(Tool tool, CodeGenerator generator, Grammar grammar, StringTemplate headerFileST, String extName) throws IOException(Code)(Java Doc) public int getMaxCharValue(CodeGenerator generator)(Code)(Java Doc) public String getTarget64BitStringFromValue(long word)(Code)(Java Doc) public String getTargetCharLiteralFromANTLRCharLiteral(CodeGenerator generator, String literal)(Code)(Java Doc) public String getTargetStringLiteralFromANTLRStringLiteral(CodeGenerator generator, String literal)(Code)(Java Doc) public String getTargetStringLiteralFromString(String s, boolean quoted)(Code)(Java Doc) public String getTargetStringLiteralFromString(String s)(Code)(Java Doc) public String getTokenTypeAsTargetLabel(CodeGenerator generator, int ttype)(Code)(Java Doc) public boolean isValidActionScope(int grammarType, String scope)(Code)(Java Doc) protected void performGrammarAnalysis(CodeGenerator generator, Grammar grammar)(Code)(Java Doc) public List postProcessAction(List chunks, antlr.Token actionToken)(Code)(Java Doc)
|
|
|