|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.jrst.JRSTLexer
public class JRSTLexer
Le principe est de positionner la mark du AdvancedReader lors du
debut d'une methode peek*, puis a la fin de la methode de regarder le nombre
de caractere utilisé pour la methode et de faire un reset.
Le nombre de caractere utilisé servira pour le remove lorsque l'utilisateur indiquera qu'il utilise l'element retourné, si l'utilisateur n'appelle pas remove alors il peut relire autant de fois qu'il veut le meme element, ou essayer d'en lire un autre.
Pour mettre en place ce mecanisme le plus simple est d'utiliser les methodes
beginPeek() et endPeek()
Created: 28 oct. 06 00:44:20
| Constructor Summary | |
|---|---|
JRSTLexer(Reader reader)
|
|
| Method Summary | |
|---|---|
boolean |
eof()
true if no more element to read |
int |
getCharNumber()
return the number of char read |
int |
getLineNumber()
return the number of line read |
protected org.dom4j.Element |
peekAdmonition()
read admonitions : admonition|attention|caution|danger|error|hint|important|note|tip|warning .. |
org.dom4j.Element |
peekBlankLine()
read blank line |
org.dom4j.Element |
peekBodyElement()
Return para |
org.dom4j.Element |
peekBulletList()
read list - first line - next line |
org.dom4j.Element |
peekDefinitionList()
read definition list un autre mot une autre definition le mot : la classe la definition le mot : la classe 1 : la classe 2 la definition |
org.dom4j.Element |
peekDirectiveOrReference()
read directive or reference |
org.dom4j.Element |
peekDocInfo()
read doc info author, date, version, ... or field list element :author: Benjamin Poussin :address: Quelque part Dans le monde |
org.dom4j.Element |
peekDocInfoItem()
read doc info author, date, version, ... |
org.dom4j.Element |
peekEnumeratedList()
read enumarted list can be: 1, 2, 3, ... |
org.dom4j.Element |
peekFieldList()
read field list :first: text :second: text and other text :last empty: |
org.dom4j.Element |
peekFooter()
search if the doc have an header .. footer:: design by **LETELLIER Sylvain** |
org.dom4j.Element |
peekFootnote()
.. |
org.dom4j.Element |
peekHeader()
search if the doc have an header .. header:: This space for rent. aaaa **aaaa** |
org.dom4j.Element |
peekLiteralBlock()
read literal block :: LiteralBlock |
org.dom4j.Element |
peekOption()
read options Ex : -a command-line option "a" -1 file, --one=file, --two file Multiple options with arguments. |
org.dom4j.Element |
peekPara()
read paragraph with attribut level that represente the space numbers at left side |
org.dom4j.Element |
peekRemove()
Remove already read elements |
org.dom4j.Element |
peekTable()
read table simple and complexe +------------------------+------------+----------+----------+ | Header row, column 1 | Header 2 | Header 3 | Header 4 | | (header rows optional) | | | | +========================+============+==========+==========+ | body row 1, column 1 | column 2 | column 3 | column 4 | +------------------------+------------+----------+----------+ | body row 2 | Cells may span columns |
org.dom4j.Element |
peekTarget()
|
LinkedList<org.dom4j.Element> |
peekTargetAnonymous()
.. __: http://www.python.org |
org.dom4j.Element |
peekTitle()
Parse un titre simple ou double simple: Le titre ======== double: ============ le titre ============ |
org.dom4j.Element |
peekTitleOrBodyElement()
Return title or para |
org.dom4j.Element |
peekTransition()
read transition |
String |
readNotBlanckLine()
Lit les premieres ligne non vide et les retourne, rien n'est modifier par rapport aux positions dans le fichier. |
LinkedList<org.dom4j.Element> |
refTarget()
.. |
void |
remove()
remove one element from list of element already read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BULLET_CHAR
public static final String TITLE_CHAR
public static final String DOCINFO_ITEM
public static final String ADMONITION_PATTERN
public static final String TITLE
public static final String DOCINFO
public static final String DECORATION
public static final String HEADER
public static final String FOOTER
public static final String TRANSITION
public static final String SIDEBAR
public static final String TOPIC
public static final String LITERAL_BLOCK
public static final String PARAGRAPH
public static final String BLANK_LINE
public static final String SUBSTITUTION_DEFINITION
public static final String BULLET_LIST
public static final String FIELD_LIST
public static final String DEFINITION_LIST
public static final String ENUMERATED_LIST
public static final String OPTION_LIST
public static final String LINE_BLOCK
public static final String LINE
public static final String BLOCK_QUOTE
public static final String ATTRIBUTION
public static final String DOCTEST_BLOCK
public static final String ADMONITION
public static final String TARGET
public static final String FOOTNOTE
public static final String TABLE
public static final String ROW
public static final String CELL
public static final String TABLE_HEADER
public static final String TABLE_WIDTH
public static final String ROW_END_HEADER
public static final String CELL_INDEX_START
public static final String CELL_INDEX_END
public static final String CELL_BEGIN
public static final String CELL_END
public static final String DIRECTIVE
public static final String DIRECTIVE_TYPE
public static final String DIRECTIVE_VALUE
| Constructor Detail |
|---|
public JRSTLexer(Reader reader)
| Method Detail |
|---|
public boolean eof()
throws IOException
IOException
public void remove()
throws IOException
IOException
public org.dom4j.Element peekHeader()
throws IOException
.. header:: This space for rent. aaaa **aaaa**
IOException
public org.dom4j.Element peekFooter()
throws IOException
.. footer:: design by **LETELLIER Sylvain**
IOException
public LinkedList<org.dom4j.Element> peekTargetAnonymous()
throws IOException
.. __: http://www.python.org
IOException
public org.dom4j.Element peekTitleOrBodyElement()
throws IOException
IOException
public org.dom4j.Element peekDocInfo()
throws IOException
:author: Benjamin Poussin :address: Quelque part Dans le monde
IOException
public org.dom4j.Element peekBodyElement()
throws IOException
IOException
public org.dom4j.Element peekRemove()
throws IOException
IOException
public org.dom4j.Element peekOption()
throws IOException
Ex : -a command-line option "a"
-1 file, --one=file, --two file
Multiple options with arguments.
Schéma : ________________________________
v | |
-{1,2}\w+ ->|',' |
|'='-----|-> \w+ --->|','
|' '-----| |' '---+
|" " -----> \w+ ---> end |
ˆ |
|_________________________|
Légende :
-{1,2} --> 1 or 2 tirets
\w+ -----> word characters one or more times
IOException
protected org.dom4j.Element peekAdmonition()
throws IOException
.. Attention:: All your base are belong to us.
.. admonition:: And, by the way...
You can make up your own admonition too.
IOException
public org.dom4j.Element peekBlankLine()
throws IOException
IOException
public org.dom4j.Element peekDirectiveOrReference()
throws IOException
IOException
public org.dom4j.Element peekTransition()
throws IOException
IOException
public org.dom4j.Element peekPara()
throws IOException
IOException
public org.dom4j.Element peekLiteralBlock()
throws IOException
::
LiteralBlock
IOException
public org.dom4j.Element peekDocInfoItem()
throws IOException
:author: Benjamin Poussin :address: Quelque part Dans le monde
IOException
public org.dom4j.Element peekTable()
throws IOException
+------------------------+------------+----------+----------+ | Header row, column 1 | Header 2 | Header 3 | Header 4 | | (header rows optional) | | | | +========================+============+==========+==========+ | body row 1, column 1 | column 2 | column 3 | column 4 | +------------------------+------------+----------+----------+ | body row 2 | Cells may span columns. | +------------------------+------------+---------------------+
IOException
public org.dom4j.Element peekBulletList()
throws IOException
- first line - next line
IOException
public org.dom4j.Element peekFieldList()
throws IOException
:first: text :second: text and other text :last empty:
IOException
public org.dom4j.Element peekDefinitionList()
throws IOException
un autre mot une autre definition le mot : la classe la definition le mot : la classe 1 : la classe 2 la definition
IOException
public org.dom4j.Element peekEnumeratedList()
throws IOException
1. next line 1) next line (1) first line
IOException
public org.dom4j.Element peekTitle()
throws IOException
Le titre ========double:
============ le titre ============
IOException
public org.dom4j.Element peekTarget()
throws IOException
IOException
public LinkedList<org.dom4j.Element> refTarget()
throws IOException
IOException
public org.dom4j.Element peekFootnote()
throws IOException
IOException
public String readNotBlanckLine()
throws IOException
IOExceptionpublic int getLineNumber()
public int getCharNumber()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||