public class JRSTLexer extends Object
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
JRSTLexer#beginPeek()
et JRSTLexer#endPeek()
Created: 28 oct. 06 00:44:20
Modifier and Type | Method and Description |
---|---|
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
|
List<org.dom4j.Element> |
peekAllComment()
..
|
org.dom4j.Element |
peekBlankLine()
read blank line
|
org.dom4j.Element |
peekBodyElement()
Return para
|
org.dom4j.Element |
peekBulletList()
read list
|
org.dom4j.Element |
peekDefinitionList()
read definition list
|
org.dom4j.Element |
peekDirectiveOrReference()
read directive or reference
|
org.dom4j.Element |
peekDocInfo()
read doc info author, date, version, ...
|
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
|
org.dom4j.Element |
peekFooter()
search if the doc have an header
|
org.dom4j.Element |
peekFootnote()
..
|
org.dom4j.Element |
peekHeader()
search if the doc have an header
|
org.dom4j.Element |
peekLiteralBlock()
read literal block
|
org.dom4j.Element |
peekOption()
read options
|
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
|
org.dom4j.Element |
peekTarget() |
LinkedList<org.dom4j.Element> |
peekTargetAnonymous()
..
|
org.dom4j.Element |
peekTitle()
Parse un titre simple ou double
simple:
|
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
|
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 COMMENT
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 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 FOOTNOTES
public static final String LEVEL
public static final String TARGETANONYMOUS
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 REMOVE
public static final String INCLUDE
public static final String DIRECTIVE
public static final String DIRECTIVE_TYPE
public static final String DIRECTIVE_VALUE
public static final String AUTONUM
public static final String AUTONUMLABEL
public static final String AUTOSYMBOL
public static final String BULLET
public static final String CHAR
public static final String ID
public static final String CLASSIFIERS
public static final String DELIMITER
public static final String DELIMITEREXISTE
public static final String ENUMTYPE
public static final String REFURI
public static final String OPTION
public static final String LITERAL
public static final String NAME
public static final String NUM
public static final String OPTIONARGUMENT
public static final String OPTIONSTRING
public static final String PREFIX
public static final String START
public static final String SUBEXISTE
public static final String SUFFIX
public static final String SUBTITLE
public static final String TERM
public static final String TITLEATTR
public static final String XMLSPACE
public static final String TYPE
protected static final String TRUE
protected static final String FALSE
public JRSTLexer(Reader reader)
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 List<org.dom4j.Element> peekAllComment() throws IOException
IOException
public org.dom4j.Element peekFootnote() throws IOException
IOException
public String readNotBlanckLine() throws IOException
IOException
public int getLineNumber()
public int getCharNumber()
Copyright © 2004–2014 CodeLutin. All rights reserved.