|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.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 YAMTargetprotected void write(String s)
protected void writeln(String s)
protected String getLastOutputCommand()
protected String extractLastCommand(String text)
public void begin()
begin in interface YAMTargetpublic void end()
end in interface YAMTargetpublic void text(String t)
text in interface YAMTargetpublic void bold(String t)
bold in interface YAMTargetpublic void italic(String t)
italic in interface YAMTargetpublic void tt(String t)
tt in interface YAMTargetpublic void begin_ul(int level)
begin_ul in interface YAMTargetpublic void begin_ol(int level)
begin_ol in interface YAMTargetpublic void end_ul(int level)
end_ul in interface YAMTargetpublic void end_ol(int level)
end_ol in interface YAMTargetpublic void beginListItem(int level)
beginListItem in interface YAMTargetpublic void endListItem(int level)
endListItem in interface YAMTargetpublic void paragraph()
paragraph in interface YAMTargetpublic void linebreak()
YAMTarget
linebreak in interface YAMTargetpublic void blankline()
YAMTarget
blankline in interface YAMTargetpublic void verbatim(String rawOutput)
YAMTarget
verbatim in interface YAMTargetpublic void code(String c)
code in interface YAMTargetpublic void blockquote(String q)
blockquote in interface YAMTarget
public void link(String url,
String title)
link in interface YAMTargetpublic void anchor(String name)
anchor in interface YAMTargetpublic void title(String title)
title in interface YAMTarget
public void beginSection(String title,
int level)
beginSection in interface YAMTargetpublic void endSection(int level)
endSection in interface YAMTargetpublic void beginSectionList(int level)
beginSectionList in interface YAMTargetpublic void endSectionList(int level)
endSectionList in interface YAMTargetpublic void col()
col in interface YAMTargetpublic void row()
row in interface YAMTargetpublic void hr()
hr in interface YAMTargetpublic void begin_table()
begin_table in interface YAMTargetpublic void end_table()
end_table in interface YAMTargetpublic String beginEM()
beginEM in interface YAMTargetpublic String endEM()
endEM in interface YAMTargetpublic String beginTT()
beginTT in interface YAMTargetpublic String endTT()
endTT in interface YAMTargetpublic String beginBF()
beginBF in interface YAMTargetpublic String endBF()
endBF in interface YAMTargetpublic void longdash()
longdash in interface YAMTargetpublic 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 | |||||||||