C# Class HtmlParserSharp.Core.Tokenizer

Afficher le fichier Open project: prepare/HTML-Renderer Class Usage Examples

Protected Properties

Свойство Type Description
ampersandLocation Locator
attributeName AttributeName
confident bool
cstart int
endTag bool
endTagExpectation ElementName
html4 bool
index int
lastCR bool
stateSave TokenizerState
value int

Méthodes publiques

Méthode Description
BecomeConfident ( ) : void
End ( ) : void
Eof ( ) : void
Err ( string message ) : void
ErrTreeBuilder ( string message ) : void
Fatal ( string message ) : void
InitializeWithoutStarting ( ) : void
InternalEncodingDeclaration ( string internalCharset ) : bool
LoadState ( Tokenizer other ) : void
NotifyAboutMetaBoundary ( ) : void
RequestSuspension ( ) : void
ResetToDataState ( ) : void
SetStateAndEndTagExpectation ( TokenizerState specialTokenizerState, ElementName endTagExpectation ) : void
SetStateAndEndTagExpectation ( TokenizerState specialTokenizerState, [ endTagExpectation ) : void
SetTransitionBaseOffset ( int offset ) : void

Sets an offset to be added to the position reported to TransitionHandler.

Start ( ) : void
TokenizeBuffer ( UTF16Buffer buffer ) : bool
Tokenizer ( ITokenHandler tokenHandler ) : System
Tokenizer ( ITokenHandler tokenHandler, bool newAttributesEachTime ) : System
Warn ( string message ) : void

Méthodes protégées

Méthode Description
ErrAstralNonCharacter ( int ch ) : void
ErrAttributeValueMissing ( ) : void
ErrBadCharAfterLt ( char c ) : void
ErrBadCharBeforeAttributeNameOrNull ( char c ) : void
ErrBogusComment ( ) : void
ErrBogusDoctype ( ) : void
ErrCharRefLacksSemicolon ( ) : void
ErrConsecutiveHyphens ( ) : void
ErrDuplicateAttribute ( ) : void
ErrEofAfterLt ( ) : void
ErrEofInAttributeName ( ) : void
ErrEofInAttributeValue ( ) : void
ErrEofInComment ( ) : void
ErrEofInDoctype ( ) : void
ErrEofInEndTag ( ) : void
ErrEofInPublicId ( ) : void
ErrEofInSystemId ( ) : void
ErrEofInTagName ( ) : void
ErrEofWithoutGt ( ) : void
ErrEqualsSignBeforeAttributeName ( ) : void
ErrExpectedPublicId ( ) : void
ErrExpectedSystemId ( ) : void
ErrGarbageAfterLtSlash ( ) : void
ErrGtInPublicId ( ) : void
ErrGtInSystemId ( ) : void
ErrHtml4LtSlashInRcdata ( char folded ) : void
ErrHtml4NonNameInUnquotedAttribute ( char c ) : void
ErrHtml4XmlVoidSyntax ( ) : void
ErrHyphenHyphenBang ( ) : void
ErrLtGt ( ) : void
ErrLtOrEqualsOrGraveInUnquotedAttributeOrNull ( char c ) : void
ErrLtSlashGt ( ) : void
ErrMissingSpaceBeforeDoctypeName ( ) : void
ErrNamelessDoctype ( ) : void
ErrNcrControlChar ( char ch ) : char
ErrNcrControlChar ( ) : void
ErrNcrCr ( ) : void
ErrNcrInC1Range ( ) : void
ErrNcrNonCharacter ( char ch ) : char
ErrNcrOutOfRange ( ) : void
ErrNcrSurrogate ( ) : void
ErrNcrUnassigned ( ) : void
ErrNcrZero ( ) : void
ErrNoDigitsInNCR ( ) : void
ErrNoNamedCharacterMatch ( ) : void
ErrNoSpaceBetweenAttributes ( ) : void
ErrNoSpaceBetweenDoctypePublicKeywordAndQuote ( ) : void
ErrNoSpaceBetweenDoctypeSystemKeywordAndQuote ( ) : void
ErrNoSpaceBetweenPublicAndSystemIds ( ) : void
ErrNotSemicolonTerminated ( ) : void
ErrPrematureEndOfComment ( ) : void
ErrProcessingInstruction ( ) : void
ErrQuoteBeforeAttributeName ( char c ) : void
ErrQuoteOrLtInAttributeNameOrNull ( char c ) : void
ErrSlashNotFollowedByGt ( ) : void
ErrUnescapedAmpersandInterpretedAsCharacterReference ( ) : void
ErrUnquotedAttributeValOrNull ( char c ) : void
ErrWarnLtSlashInRcdata ( ) : void
FlushChars ( char buf, int pos ) : void

Flushes coalesced character tokens.

MaybeErrAttributesOnEndTag ( HtmlAttributes attrs ) : void
MaybeErrSlashInEndTag ( bool selfClosing ) : void
MaybeWarnPrivateUse ( char ch ) : void
MaybeWarnPrivateUseAstral ( ) : void
NoteAttributeWithoutValue ( ) : void
NoteUnquotedAttributeValue ( ) : void
SilentCarriageReturn ( ) : void
SilentLineFeed ( ) : void
StartErrorReporting ( ) : void

Private Methods

Méthode Description
AddAttributeWithValue ( ) : void
AddAttributeWithoutValue ( ) : void
AdjustDoubleHyphenAndAppendToLongStrBufAndErr ( char c ) : void
AdjustDoubleHyphenAndAppendToLongStrBufCarriageReturn ( ) : void
AdjustDoubleHyphenAndAppendToLongStrBufLineFeed ( ) : void
AppendLongStrBuf ( char c ) : void
AppendLongStrBuf ( char buffer, int offset, int length ) : void
AppendLongStrBufCarriageReturn ( ) : void
AppendLongStrBufLineFeed ( ) : void
AppendSecondHyphenToBogusComment ( ) : void
AppendStrBuf ( char c ) : void
AppendStrBufToLongStrBuf ( ) : void
AttributeNameComplete ( ) : void
BogusDoctype ( ) : void
BogusDoctypeWithoutQuirks ( ) : void
ClearLongStrBuf ( ) : void
ClearLongStrBufAndAppend ( char c ) : void
ClearStrBuf ( ) : void
ClearStrBufAndAppend ( char c ) : void
EmitCarriageReturn ( char buf, int pos ) : void
EmitComment ( int provisionalHyphens, int pos ) : void

Emits the current comment token.

EmitCurrentTagToken ( bool selfClosing, int pos ) : TokenizerState
EmitDoctypeToken ( int pos ) : void
EmitOrAppendOne ( char val, TokenizerState returnState ) : void
EmitOrAppendStrBuf ( TokenizerState returnState ) : void
EmitOrAppendTwo ( char val, TokenizerState returnState ) : void
EmitPlaintextReplacementCharacter ( char buf, int pos ) : void
EmitReplacementCharacter ( char buf, int pos ) : void
EmitStrBuf ( ) : void
EmptyAttributes ( ) : HtmlAttributes
EndTagExpectationToArray ( ) : void
HandleNcrValue ( TokenizerState returnState ) : void
InitDoctypeFields ( ) : void
LongStrBufToString ( ) : string
MaybeAppendSpaceToBogusComment ( ) : void
NewAsciiLowerCaseStringFromString ( String str ) : String
ResetAttributes ( ) : void
SetAdditionalAndRememberAmpersandLocation ( char add ) : void
StateLoop ( TokenizerState state, char c, int pos, char buf, bool reconsume, TokenizerState returnState, int endPos ) : int
StrBufToDoctypeName ( ) : void
StrBufToElementNameString ( ) : void
TurnOnAdditionalHtml4Errors ( ) : void

Method Details

BecomeConfident() public méthode

public BecomeConfident ( ) : void
Résultat void

End() public méthode

public End ( ) : void
Résultat void

Eof() public méthode

public Eof ( ) : void
Résultat void

Err() public méthode

public Err ( string message ) : void
message string
Résultat void

ErrAstralNonCharacter() protected méthode

protected ErrAstralNonCharacter ( int ch ) : void
ch int
Résultat void

ErrAttributeValueMissing() protected méthode

protected ErrAttributeValueMissing ( ) : void
Résultat void

ErrBadCharAfterLt() protected méthode

protected ErrBadCharAfterLt ( char c ) : void
c char
Résultat void

ErrBadCharBeforeAttributeNameOrNull() protected méthode

protected ErrBadCharBeforeAttributeNameOrNull ( char c ) : void
c char
Résultat void

ErrBogusComment() protected méthode

protected ErrBogusComment ( ) : void
Résultat void

ErrBogusDoctype() protected méthode

protected ErrBogusDoctype ( ) : void
Résultat void

ErrCharRefLacksSemicolon() protected méthode

protected ErrCharRefLacksSemicolon ( ) : void
Résultat void

ErrConsecutiveHyphens() protected méthode

protected ErrConsecutiveHyphens ( ) : void
Résultat void

ErrDuplicateAttribute() protected méthode

protected ErrDuplicateAttribute ( ) : void
Résultat void

ErrEofAfterLt() protected méthode

protected ErrEofAfterLt ( ) : void
Résultat void

ErrEofInAttributeName() protected méthode

protected ErrEofInAttributeName ( ) : void
Résultat void

ErrEofInAttributeValue() protected méthode

protected ErrEofInAttributeValue ( ) : void
Résultat void

ErrEofInComment() protected méthode

protected ErrEofInComment ( ) : void
Résultat void

ErrEofInDoctype() protected méthode

protected ErrEofInDoctype ( ) : void
Résultat void

ErrEofInEndTag() protected méthode

protected ErrEofInEndTag ( ) : void
Résultat void

ErrEofInPublicId() protected méthode

protected ErrEofInPublicId ( ) : void
Résultat void

ErrEofInSystemId() protected méthode

protected ErrEofInSystemId ( ) : void
Résultat void

ErrEofInTagName() protected méthode

protected ErrEofInTagName ( ) : void
Résultat void

ErrEofWithoutGt() protected méthode

protected ErrEofWithoutGt ( ) : void
Résultat void

ErrEqualsSignBeforeAttributeName() protected méthode

protected ErrEqualsSignBeforeAttributeName ( ) : void
Résultat void

ErrExpectedPublicId() protected méthode

protected ErrExpectedPublicId ( ) : void
Résultat void

ErrExpectedSystemId() protected méthode

protected ErrExpectedSystemId ( ) : void
Résultat void

ErrGarbageAfterLtSlash() protected méthode

protected ErrGarbageAfterLtSlash ( ) : void
Résultat void

ErrGtInPublicId() protected méthode

protected ErrGtInPublicId ( ) : void
Résultat void

ErrGtInSystemId() protected méthode

protected ErrGtInSystemId ( ) : void
Résultat void

ErrHtml4LtSlashInRcdata() protected méthode

protected ErrHtml4LtSlashInRcdata ( char folded ) : void
folded char
Résultat void

ErrHtml4NonNameInUnquotedAttribute() protected méthode

protected ErrHtml4NonNameInUnquotedAttribute ( char c ) : void
c char
Résultat void

ErrHtml4XmlVoidSyntax() protected méthode

protected ErrHtml4XmlVoidSyntax ( ) : void
Résultat void

ErrHyphenHyphenBang() protected méthode

protected ErrHyphenHyphenBang ( ) : void
Résultat void

ErrLtGt() protected méthode

protected ErrLtGt ( ) : void
Résultat void

ErrLtOrEqualsOrGraveInUnquotedAttributeOrNull() protected méthode

protected ErrLtOrEqualsOrGraveInUnquotedAttributeOrNull ( char c ) : void
c char
Résultat void

ErrLtSlashGt() protected méthode

protected ErrLtSlashGt ( ) : void
Résultat void

ErrMissingSpaceBeforeDoctypeName() protected méthode

protected ErrMissingSpaceBeforeDoctypeName ( ) : void
Résultat void

ErrNamelessDoctype() protected méthode

protected ErrNamelessDoctype ( ) : void
Résultat void

ErrNcrControlChar() protected méthode

protected ErrNcrControlChar ( char ch ) : char
ch char
Résultat char

ErrNcrControlChar() protected méthode

protected ErrNcrControlChar ( ) : void
Résultat void

ErrNcrCr() protected méthode

protected ErrNcrCr ( ) : void
Résultat void

ErrNcrInC1Range() protected méthode

protected ErrNcrInC1Range ( ) : void
Résultat void

ErrNcrNonCharacter() protected méthode

protected ErrNcrNonCharacter ( char ch ) : char
ch char
Résultat char

ErrNcrOutOfRange() protected méthode

protected ErrNcrOutOfRange ( ) : void
Résultat void

ErrNcrSurrogate() protected méthode

protected ErrNcrSurrogate ( ) : void
Résultat void

ErrNcrUnassigned() protected méthode

protected ErrNcrUnassigned ( ) : void
Résultat void

ErrNcrZero() protected méthode

protected ErrNcrZero ( ) : void
Résultat void

ErrNoDigitsInNCR() protected méthode

protected ErrNoDigitsInNCR ( ) : void
Résultat void

ErrNoNamedCharacterMatch() protected méthode

protected ErrNoNamedCharacterMatch ( ) : void
Résultat void

ErrNoSpaceBetweenAttributes() protected méthode

protected ErrNoSpaceBetweenAttributes ( ) : void
Résultat void

ErrNoSpaceBetweenDoctypePublicKeywordAndQuote() protected méthode

protected ErrNoSpaceBetweenDoctypePublicKeywordAndQuote ( ) : void
Résultat void

ErrNoSpaceBetweenDoctypeSystemKeywordAndQuote() protected méthode

protected ErrNoSpaceBetweenDoctypeSystemKeywordAndQuote ( ) : void
Résultat void

ErrNoSpaceBetweenPublicAndSystemIds() protected méthode

protected ErrNoSpaceBetweenPublicAndSystemIds ( ) : void
Résultat void

ErrNotSemicolonTerminated() protected méthode

protected ErrNotSemicolonTerminated ( ) : void
Résultat void

ErrPrematureEndOfComment() protected méthode

protected ErrPrematureEndOfComment ( ) : void
Résultat void

ErrProcessingInstruction() protected méthode

protected ErrProcessingInstruction ( ) : void
Résultat void

ErrQuoteBeforeAttributeName() protected méthode

protected ErrQuoteBeforeAttributeName ( char c ) : void
c char
Résultat void

ErrQuoteOrLtInAttributeNameOrNull() protected méthode

protected ErrQuoteOrLtInAttributeNameOrNull ( char c ) : void
c char
Résultat void

ErrSlashNotFollowedByGt() protected méthode

protected ErrSlashNotFollowedByGt ( ) : void
Résultat void

ErrTreeBuilder() public méthode

public ErrTreeBuilder ( string message ) : void
message string
Résultat void

ErrUnescapedAmpersandInterpretedAsCharacterReference() protected méthode

protected ErrUnescapedAmpersandInterpretedAsCharacterReference ( ) : void
Résultat void

ErrUnquotedAttributeValOrNull() protected méthode

protected ErrUnquotedAttributeValOrNull ( char c ) : void
c char
Résultat void

ErrWarnLtSlashInRcdata() protected méthode

protected ErrWarnLtSlashInRcdata ( ) : void
Résultat void

Fatal() public méthode

public Fatal ( string message ) : void
message string
Résultat void

FlushChars() protected méthode

Flushes coalesced character tokens.
protected FlushChars ( char buf, int pos ) : void
buf char The buffer.
pos int The position.
Résultat void

InitializeWithoutStarting() public méthode

public InitializeWithoutStarting ( ) : void
Résultat void

InternalEncodingDeclaration() public méthode

public InternalEncodingDeclaration ( string internalCharset ) : bool
internalCharset string
Résultat bool

LoadState() public méthode

public LoadState ( Tokenizer other ) : void
other Tokenizer
Résultat void

MaybeErrAttributesOnEndTag() protected méthode

protected MaybeErrAttributesOnEndTag ( HtmlAttributes attrs ) : void
attrs HtmlAttributes
Résultat void

MaybeErrSlashInEndTag() protected méthode

protected MaybeErrSlashInEndTag ( bool selfClosing ) : void
selfClosing bool
Résultat void

MaybeWarnPrivateUse() protected méthode

protected MaybeWarnPrivateUse ( char ch ) : void
ch char
Résultat void

MaybeWarnPrivateUseAstral() protected méthode

protected MaybeWarnPrivateUseAstral ( ) : void
Résultat void

NoteAttributeWithoutValue() protected méthode

protected NoteAttributeWithoutValue ( ) : void
Résultat void

NoteUnquotedAttributeValue() protected méthode

protected NoteUnquotedAttributeValue ( ) : void
Résultat void

NotifyAboutMetaBoundary() public méthode

public NotifyAboutMetaBoundary ( ) : void
Résultat void

RequestSuspension() public méthode

public RequestSuspension ( ) : void
Résultat void

ResetToDataState() public méthode

public ResetToDataState ( ) : void
Résultat void

SetStateAndEndTagExpectation() public méthode

public SetStateAndEndTagExpectation ( TokenizerState specialTokenizerState, ElementName endTagExpectation ) : void
specialTokenizerState TokenizerState
endTagExpectation ElementName
Résultat void

SetStateAndEndTagExpectation() public méthode

public SetStateAndEndTagExpectation ( TokenizerState specialTokenizerState, [ endTagExpectation ) : void
specialTokenizerState TokenizerState
endTagExpectation [
Résultat void

SetTransitionBaseOffset() public méthode

Sets an offset to be added to the position reported to TransitionHandler.
public SetTransitionBaseOffset ( int offset ) : void
offset int The offset.
Résultat void

SilentCarriageReturn() protected méthode

protected SilentCarriageReturn ( ) : void
Résultat void

SilentLineFeed() protected méthode

protected SilentLineFeed ( ) : void
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

StartErrorReporting() protected méthode

protected StartErrorReporting ( ) : void
Résultat void

TokenizeBuffer() public méthode

public TokenizeBuffer ( UTF16Buffer buffer ) : bool
buffer UTF16Buffer
Résultat bool

Tokenizer() public méthode

public Tokenizer ( ITokenHandler tokenHandler ) : System
tokenHandler ITokenHandler
Résultat System

Tokenizer() public méthode

public Tokenizer ( ITokenHandler tokenHandler, bool newAttributesEachTime ) : System
tokenHandler ITokenHandler
newAttributesEachTime bool
Résultat System

Warn() public méthode

public Warn ( string message ) : void
message string
Résultat void

Property Details

ampersandLocation protected_oe property

protected Locator ampersandLocation
Résultat Locator

attributeName protected_oe property

protected AttributeName attributeName
Résultat AttributeName

confident protected_oe property

protected bool confident
Résultat bool

cstart protected_oe property

protected int cstart
Résultat int

endTag protected_oe property

protected bool endTag
Résultat bool

endTagExpectation protected_oe property

protected ElementName endTagExpectation
Résultat ElementName

html4 protected_oe property

protected bool html4
Résultat bool

index protected_oe property

protected int index
Résultat int

lastCR protected_oe property

protected bool lastCR
Résultat bool

stateSave protected_oe property

protected TokenizerState stateSave
Résultat TokenizerState

value protected_oe property

protected int value
Résultat int