|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gate.wiki.antlr.NOPTarget
public class NOPTarget
This class represents the NOP translation and can be used to check syntax of your YAM input. More importantly, it is a useful superclass for translation targets because when I add features later the targets by default ignore these enhancements--avoiding the cost of modifying every target. The cost is a loss of compile-error when you don't implement a feature. Some useful support routines here. Using write/writeln is good because it buffers the last output string. For example, If you need to avoid generating a paragraph symbol after a list because it makes too much space, you can look back to see what you just generated.
Field Summary | |
---|---|
protected String |
lastCommand
|
protected Writer |
out
|
Constructor Summary | |
---|---|
NOPTarget()
|
Method Summary | |
---|---|
void |
anchor(String name)
|
void |
begin_ol(int level)
|
void |
begin_table()
|
void |
begin_ul(int level)
|
void |
begin()
insert head.html if found |
String |
beginBF()
|
String |
beginEM()
|
void |
beginListItem(int level)
|
void |
beginSection(String title,
int level)
|
void |
beginSectionList(int level)
|
String |
beginTT()
|
void |
blankline()
They want a blank line without signaling a new paragraph. |
void |
blockquote(String q)
|
void |
bold(String t)
|
void |
box(YAMContext context,
Vector args)
|
void |
c(YAMContext context,
Vector args)
|
void |
cite(YAMContext context,
Vector args)
Former plugins |
void |
code(String c)
|
void |
col()
|
void |
contents()
|
void |
date(YAMContext context,
Vector args)
|
void |
delete(YAMContext context,
Vector args)
|
void |
end_ol(int level)
|
void |
end_table()
|
void |
end_ul(int level)
|
void |
end()
insert tail.html if found |
String |
endBF()
|
String |
endEM()
|
void |
endListItem(int level)
|
void |
endSection(int level)
|
void |
endSectionList(int level)
|
String |
endTT()
|
void |
eps(YAMContext context,
Vector args)
|
protected String |
extractLastCommand(String text)
Subclasses should implement this; i.e., pull out <... |
void |
footnote(YAMContext context,
Vector args)
|
protected String |
getLastOutputCommand()
|
String |
getTargetLanguage()
Typically "HTML", or "Lout" |
void |
hr()
|
void |
image(YAMContext context,
Vector args)
Former plugins |
void |
include(YAMContext context,
Vector args)
|
void |
italic(String t)
|
void |
linebreak()
They want a new line in a paragraph |
void |
link(String url,
String title)
|
void |
longdash()
|
void |
notes(YAMContext context,
Vector args)
|
void |
paragraph()
|
void |
row()
|
void |
syndiag(YAMContext context,
Vector args)
|
void |
text(String t)
|
void |
title(String title)
|
void |
tree(YAMContext context,
Vector args)
|
void |
tt(String t)
|
void |
verbatim(String rawOutput)
Assume rawOutput is in output language and just dump |
void |
wikilink(String url,
String title)
|
protected void |
write(String s)
|
protected void |
writeln(String s)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Writer out
protected String lastCommand
Constructor Detail |
---|
public NOPTarget()
Method Detail |
---|
public String getTargetLanguage()
YAMTarget
getTargetLanguage
in interface YAMTarget
protected void write(String s)
protected void writeln(String s)
protected String getLastOutputCommand()
protected String extractLastCommand(String text)
public void begin()
begin
in interface YAMTarget
public void end()
end
in interface YAMTarget
public void text(String t)
text
in interface YAMTarget
public void bold(String t)
bold
in interface YAMTarget
public void italic(String t)
italic
in interface YAMTarget
public void tt(String t)
tt
in interface YAMTarget
public void begin_ul(int level)
begin_ul
in interface YAMTarget
public void begin_ol(int level)
begin_ol
in interface YAMTarget
public void end_ul(int level)
end_ul
in interface YAMTarget
public void end_ol(int level)
end_ol
in interface YAMTarget
public void beginListItem(int level)
beginListItem
in interface YAMTarget
public void endListItem(int level)
endListItem
in interface YAMTarget
public void paragraph()
paragraph
in interface YAMTarget
public void linebreak()
YAMTarget
linebreak
in interface YAMTarget
public void blankline()
YAMTarget
blankline
in interface YAMTarget
public void verbatim(String rawOutput)
YAMTarget
verbatim
in interface YAMTarget
public void code(String c)
code
in interface YAMTarget
public void blockquote(String q)
blockquote
in interface YAMTarget
public void link(String url, String title)
link
in interface YAMTarget
public void anchor(String name)
anchor
in interface YAMTarget
public void title(String title)
title
in interface YAMTarget
public void beginSection(String title, int level)
beginSection
in interface YAMTarget
public void endSection(int level)
endSection
in interface YAMTarget
public void beginSectionList(int level)
beginSectionList
in interface YAMTarget
public void endSectionList(int level)
endSectionList
in interface YAMTarget
public void col()
col
in interface YAMTarget
public void row()
row
in interface YAMTarget
public void hr()
hr
in interface YAMTarget
public void begin_table()
begin_table
in interface YAMTarget
public void end_table()
end_table
in interface YAMTarget
public String beginEM()
beginEM
in interface YAMTarget
public String endEM()
endEM
in interface YAMTarget
public String beginTT()
beginTT
in interface YAMTarget
public String endTT()
endTT
in interface YAMTarget
public String beginBF()
beginBF
in interface YAMTarget
public String endBF()
endBF
in interface YAMTarget
public void longdash()
longdash
in interface YAMTarget
public void contents()
contents
in interface YAMTarget
public void wikilink(String url, String title)
wikilink
in interface YAMTarget
public void image(YAMContext context, Vector args)
image
in interface YAMTarget
public void cite(YAMContext context, Vector args)
YAMTarget
cite
in interface YAMTarget
public void box(YAMContext context, Vector args)
box
in interface YAMTarget
public void c(YAMContext context, Vector args)
c
in interface YAMTarget
public void date(YAMContext context, Vector args)
date
in interface YAMTarget
public void delete(YAMContext context, Vector args)
delete
in interface YAMTarget
public void eps(YAMContext context, Vector args)
eps
in interface YAMTarget
public void footnote(YAMContext context, Vector args)
footnote
in interface YAMTarget
public void include(YAMContext context, Vector args)
include
in interface YAMTarget
public void notes(YAMContext context, Vector args)
notes
in interface YAMTarget
public void syndiag(YAMContext context, Vector args)
syndiag
in interface YAMTarget
public void tree(YAMContext context, Vector args)
tree
in interface YAMTarget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |