C# 클래스 Tidy.Core.Lexer

Lexer for html parser (c) 1998-2000 (W3C) MIT, INRIA, Keio University See Tidy.cs for the copyright notice. Derived from HTML Tidy Release 4 Aug 2000
Given a file stream fp it returns a sequence of tokens. GetToken(fp) gets the next token UngetToken(fp) provides one level undo The tags include an attribute list: - linked list of attribute/value nodes - each node has 2 null-terminated strings. - entities are replaced in attribute values white space is compacted if not in preformatted mode If not in preformatted mode then leading white space is discarded and subsequent white space sequences compacted to single space chars. If XmlTags is no then Tag names are folded to upper case and attribute names to lower case. Not yet done: - Doctype subset and marked sections
파일 보기 프로젝트 열기: r1pper/TidyNetPortable 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
BadAccess int
BadChars int
BadDoctype bool
BadForm int
BadLayout int
Columns int
Doctype HtmlVersion
ExcludeBlocks bool
Exiled bool
Inode Node
Input StreamIn
Insert int
Insertspace bool
Istack Stack
Istackbase int
Isvoyager bool
Lexbuf byte[]
Lexlength int
Lexsize int
Lines int
Messages TidyMessageCollection
Options TidyOptions
Pushed bool
State short
Styles Style
Token Node
Txtend int
Txtstart int
Versions HtmlVersion
Waswhite bool

보호된 프로퍼티들

프로퍼티 타입 설명
SeenBodyEndTag int

공개 메소드들

메소드 설명
AddByte ( int c ) : void
AddCharToLexer ( int c ) : void
AddGenerator ( Node root ) : bool
AddStringLiteral ( string str ) : void
AddStringToLexer ( string str ) : void
ApparentVersion ( ) : HtmlVersion
CanPrune ( Node element ) : bool
ChangeChar ( byte c ) : void
CheckDocTypeKeyWords ( Node doctype ) : bool
CloneAttributes ( AttVal attrs ) : AttVal
CloneNode ( Node node ) : Node
DeferDup ( ) : void
EndOfInput ( ) : bool
ExpectsContent ( Node node ) : bool
FindGivenVersion ( Node doctype ) : HtmlVersion
FixDocType ( Node root ) : bool
FixHtmlNameSpace ( Node root, string profile ) : void
FixId ( Node node ) : void
FixXmlPi ( Node root ) : bool
FoldCase ( char c, bool tocaps, bool xmlTags ) : char
GetBytes ( string str ) : byte[]
GetCdata ( Node container ) : Node
GetHtmlVersion ( ) : HtmlVersion
GetString ( byte bytes, int offset, int length ) : string
GetToken ( short mode ) : Node
HtmlVersionName ( ) : string
InferredTag ( string name ) : Node
InlineDup ( Node node ) : int
InsertedToken ( ) : Node
IsPushed ( Node node ) : bool
IsValidAttrName ( string attr ) : bool
Lexer ( StreamIn input, TidyOptions options ) : System
NewLineNode ( ) : Node
NewNode ( ) : Node
NewNode ( short type, byte textarray, int start, int end ) : Node
NewNode ( short type, byte textarray, int start, int end, string element ) : Node
ParseAsp ( ) : Node
ParseAttribute ( MutableBoolean isempty, MutableObject asp, MutableObject php ) : string
ParseAttrs ( MutableBoolean isempty ) : AttVal
ParseEntity ( short mode ) : void
ParsePhp ( ) : Node
ParseServerInstruction ( ) : int
ParseTagName ( ) : char
ParseValue ( string name, bool foldCase, MutableBoolean isempty, MutableInteger pdelim ) : string
PopInline ( Node node ) : void
PushInline ( Node node ) : void
SetXhtmlDocType ( Node root ) : bool
UngetToken ( ) : void

보호된 메소드들

메소드 설명
UpdateNodeTextArrays ( byte oldtextarray, byte newtextarray ) : void

비공개 메소드들

메소드 설명
FindBadSubString ( string s, string p, int len ) : bool
Lexer ( ) : System
Map ( char c ) : short
MapStr ( string str, int code ) : void

메소드 상세

AddByte() 공개 메소드

public AddByte ( int c ) : void
c int
리턴 void

AddCharToLexer() 공개 메소드

public AddCharToLexer ( int c ) : void
c int
리턴 void

AddGenerator() 공개 메소드

public AddGenerator ( Node root ) : bool
root Node
리턴 bool

AddStringLiteral() 공개 메소드

public AddStringLiteral ( string str ) : void
str string
리턴 void

AddStringToLexer() 공개 메소드

public AddStringToLexer ( string str ) : void
str string
리턴 void

ApparentVersion() 공개 메소드

public ApparentVersion ( ) : HtmlVersion
리턴 HtmlVersion

CanPrune() 공개 메소드

public CanPrune ( Node element ) : bool
element Node
리턴 bool

ChangeChar() 공개 메소드

public ChangeChar ( byte c ) : void
c byte
리턴 void

CheckDocTypeKeyWords() 공개 메소드

public CheckDocTypeKeyWords ( Node doctype ) : bool
doctype Node
리턴 bool

CloneAttributes() 공개 메소드

public CloneAttributes ( AttVal attrs ) : AttVal
attrs AttVal
리턴 AttVal

CloneNode() 공개 메소드

public CloneNode ( Node node ) : Node
node Node
리턴 Node

DeferDup() 공개 메소드

public DeferDup ( ) : void
리턴 void

EndOfInput() 공개 메소드

public EndOfInput ( ) : bool
리턴 bool

ExpectsContent() 공개 정적인 메소드

public static ExpectsContent ( Node node ) : bool
node Node
리턴 bool

FindGivenVersion() 공개 메소드

public FindGivenVersion ( Node doctype ) : HtmlVersion
doctype Node
리턴 HtmlVersion

FixDocType() 공개 메소드

public FixDocType ( Node root ) : bool
root Node
리턴 bool

FixHtmlNameSpace() 공개 메소드

public FixHtmlNameSpace ( Node root, string profile ) : void
root Node
profile string
리턴 void

FixId() 공개 메소드

public FixId ( Node node ) : void
node Node
리턴 void

FixXmlPi() 공개 메소드

public FixXmlPi ( Node root ) : bool
root Node
리턴 bool

FoldCase() 공개 정적인 메소드

public static FoldCase ( char c, bool tocaps, bool xmlTags ) : char
c char
tocaps bool
xmlTags bool
리턴 char

GetBytes() 공개 정적인 메소드

public static GetBytes ( string str ) : byte[]
str string
리턴 byte[]

GetCdata() 공개 메소드

public GetCdata ( Node container ) : Node
container Node
리턴 Node

GetHtmlVersion() 공개 메소드

public GetHtmlVersion ( ) : HtmlVersion
리턴 HtmlVersion

GetString() 공개 정적인 메소드

public static GetString ( byte bytes, int offset, int length ) : string
bytes byte
offset int
length int
리턴 string

GetToken() 공개 메소드

public GetToken ( short mode ) : Node
mode short
리턴 Node

HtmlVersionName() 공개 메소드

public HtmlVersionName ( ) : string
리턴 string

InferredTag() 공개 메소드

public InferredTag ( string name ) : Node
name string
리턴 Node

InlineDup() 공개 메소드

public InlineDup ( Node node ) : int
node Node
리턴 int

InsertedToken() 공개 메소드

public InsertedToken ( ) : Node
리턴 Node

IsPushed() 공개 메소드

public IsPushed ( Node node ) : bool
node Node
리턴 bool

IsValidAttrName() 공개 정적인 메소드

public static IsValidAttrName ( string attr ) : bool
attr string
리턴 bool

Lexer() 공개 메소드

public Lexer ( StreamIn input, TidyOptions options ) : System
input StreamIn
options TidyOptions
리턴 System

NewLineNode() 공개 메소드

public NewLineNode ( ) : Node
리턴 Node

NewNode() 공개 메소드

public NewNode ( ) : Node
리턴 Node

NewNode() 공개 메소드

public NewNode ( short type, byte textarray, int start, int end ) : Node
type short
textarray byte
start int
end int
리턴 Node

NewNode() 공개 메소드

public NewNode ( short type, byte textarray, int start, int end, string element ) : Node
type short
textarray byte
start int
end int
element string
리턴 Node

ParseAsp() 공개 메소드

public ParseAsp ( ) : Node
리턴 Node

ParseAttribute() 공개 메소드

public ParseAttribute ( MutableBoolean isempty, MutableObject asp, MutableObject php ) : string
isempty MutableBoolean
asp MutableObject
php MutableObject
리턴 string

ParseAttrs() 공개 메소드

public ParseAttrs ( MutableBoolean isempty ) : AttVal
isempty MutableBoolean
리턴 AttVal

ParseEntity() 공개 메소드

public ParseEntity ( short mode ) : void
mode short
리턴 void

ParsePhp() 공개 메소드

public ParsePhp ( ) : Node
리턴 Node

ParseServerInstruction() 공개 메소드

public ParseServerInstruction ( ) : int
리턴 int

ParseTagName() 공개 메소드

public ParseTagName ( ) : char
리턴 char

ParseValue() 공개 메소드

public ParseValue ( string name, bool foldCase, MutableBoolean isempty, MutableInteger pdelim ) : string
name string
foldCase bool
isempty MutableBoolean
pdelim MutableInteger
리턴 string

PopInline() 공개 메소드

public PopInline ( Node node ) : void
node Node
리턴 void

PushInline() 공개 메소드

public PushInline ( Node node ) : void
node Node
리턴 void

SetXhtmlDocType() 공개 메소드

public SetXhtmlDocType ( Node root ) : bool
root Node
리턴 bool

UngetToken() 공개 메소드

public UngetToken ( ) : void
리턴 void

UpdateNodeTextArrays() 보호된 메소드

protected UpdateNodeTextArrays ( byte oldtextarray, byte newtextarray ) : void
oldtextarray byte
newtextarray byte
리턴 void

프로퍼티 상세

BadAccess 공개적으로 프로퍼티

public int BadAccess
리턴 int

BadChars 공개적으로 프로퍼티

public int BadChars
리턴 int

BadDoctype 공개적으로 프로퍼티

public bool BadDoctype
리턴 bool

BadForm 공개적으로 프로퍼티

public int BadForm
리턴 int

BadLayout 공개적으로 프로퍼티

public int BadLayout
리턴 int

Columns 공개적으로 프로퍼티

public int Columns
리턴 int

Doctype 공개적으로 프로퍼티

public HtmlVersion Doctype
리턴 HtmlVersion

ExcludeBlocks 공개적으로 프로퍼티

public bool ExcludeBlocks
리턴 bool

Exiled 공개적으로 프로퍼티

public bool Exiled
리턴 bool

Inode 공개적으로 프로퍼티

public Node,Tidy.Core Inode
리턴 Node

Input 공개적으로 프로퍼티

public StreamIn,Tidy.Core Input
리턴 StreamIn

Insert 공개적으로 프로퍼티

public int Insert
리턴 int

Insertspace 공개적으로 프로퍼티

public bool Insertspace
리턴 bool

Istack 공개적으로 프로퍼티

public Stack Istack
리턴 Stack

Istackbase 공개적으로 프로퍼티

public int Istackbase
리턴 int

Isvoyager 공개적으로 프로퍼티

public bool Isvoyager
리턴 bool

Lexbuf 공개적으로 프로퍼티

public byte[] Lexbuf
리턴 byte[]

Lexlength 공개적으로 프로퍼티

public int Lexlength
리턴 int

Lexsize 공개적으로 프로퍼티

public int Lexsize
리턴 int

Lines 공개적으로 프로퍼티

public int Lines
리턴 int

Messages 공개적으로 프로퍼티

public TidyMessageCollection Messages
리턴 TidyMessageCollection

Options 공개적으로 프로퍼티

public TidyOptions,Tidy.Core Options
리턴 TidyOptions

Pushed 공개적으로 프로퍼티

public bool Pushed
리턴 bool

SeenBodyEndTag 보호되어 있는 프로퍼티

protected int SeenBodyEndTag
리턴 int

State 공개적으로 프로퍼티

public short State
리턴 short

Styles 공개적으로 프로퍼티

public Style,Tidy.Core Styles
리턴 Style

Token 공개적으로 프로퍼티

public Node,Tidy.Core Token
리턴 Node

Txtend 공개적으로 프로퍼티

public int Txtend
리턴 int

Txtstart 공개적으로 프로퍼티

public int Txtstart
리턴 int

Versions 공개적으로 프로퍼티

public HtmlVersion Versions
리턴 HtmlVersion

Waswhite 공개적으로 프로퍼티

public bool Waswhite
리턴 bool