亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? content.py

?? 智能設(shè)備中PDF閱讀器的源碼!用于windows mobile2003或者WM5以上
?? PY
?? 第 1 頁 / 共 2 頁
字號(hào):
#
#  this file contains routines used to parse the content of documentation
#  comment block and build a more structured objects out of them
#

from sources import *
from utils import *
import string, re


# this regular expresion is used to detect code sequences. these
# are simply code fragments embedded in '{' and '}' like in:
#
#  {
#    x = y + z;
#    if ( zookoo == 2 )
#    {
#      foobar();
#    }
#  }
#
# note that identation of the starting and ending accolades must be
# exactly the same. the code sequence can contain accolades at greater
# indentation
#
re_code_start = re.compile( r"(\s*){\s*$" )
re_code_end   = re.compile( r"(\s*)}\s*$" )


# this regular expression is used to isolate identifiers from
# other text
#
re_identifier = re.compile( r'(\w*)' )


#############################################################################
#
# The DocCode class is used to store source code lines.
#
#   'self.lines' contains a set of source code lines that will be dumped as
#   HTML in a <PRE> tag.
#
#   The object is filled line by line by the parser; it strips the leading
#   "margin" space from each input line before storing it in 'self.lines'.
#
class DocCode:

    def __init__( self, margin, lines ):
        self.lines  = []
        self.words  = None

        # remove margin spaces
        for l in lines:
            if string.strip( l[:margin] ) == "":
                l = l[margin:]
            self.lines.append( l )

    def dump( self, prefix = "", width=60 ):
        lines = self.dump_lines( 0, width )
        for l in lines:
            print prefix + l

    def dump_lines( self, margin=0, width=60 ):
        result = []
        for l in self.lines:
            result.append( " "*margin + l )
        return result



#############################################################################
#
# The DocPara class is used to store "normal" text paragraph.
#
#   'self.words' contains the list of words that make up the paragraph
#
class DocPara:

    def __init__( self, lines ):
        self.lines = None
        self.words = []
        for l in lines:
            l = string.strip(l)
            self.words.extend( string.split( l ) )

    def dump( self, prefix = "", width = 60 ):
        lines = self.dump_lines( 0, width )
        for l in lines:
            print prefix + l

    def dump_lines( self, margin=0, width = 60 ):
        cur    = ""  # current line
        col    = 0   # current width
        result = []

        for word in self.words:
            ln = len(word)
            if col > 0:
                ln = ln+1

            if col + ln > width:
                result.append( " "*margin + cur )
                cur = word
                col = len(word)
            else:
                if col > 0:
                    cur = cur + " "
                cur = cur + word
                col = col + ln

        if col > 0:
            result.append( " "*margin + cur )

        return result




#############################################################################
#
#  The DocField class is used to store a list containing either DocPara or
#  DocCode objects. Each DocField also has an optional "name" which is used
#  when the object corresponds to a field or value definition
#
class DocField:

    def __init__( self, name, lines ):

        self.name  = name  # can be None for normal paragraphs/sources
        self.items = []     # list of items

        mode_none  = 0   # start parsing mode
        mode_code  = 1   # parsing code sequences
        mode_para  = 3   # parsing normal paragraph

        margin     = -1  # current code sequence indentation
        cur_lines  = []

        # now analyze the markup lines to see if they contain paragraphs,
        # code sequences or fields definitions
        #
        start = 0
        mode  = mode_none
        for l in lines:

            # are we parsing a code sequence ?
            if mode == mode_code:

                m = re_code_end.match( l )
                if m and len(m.group(1)) <= margin:
                    # that's it, we finised the code sequence
                    code = DocCode( 0, cur_lines )
                    self.items.append( code )
                    margin    = -1
                    cur_lines = []
                    mode      = mode_none
                else:
                    # nope, continue the code sequence
                    cur_lines.append( l[margin:] )
            else:
                # start of code sequence ?
                m = re_code_start.match( l )
                if m:
                    # save current lines
                    if cur_lines:
                        para = DocPara( cur_lines )
                        self.items.append( para )
                        cur_lines = []

                    # switch to code extraction mode
                    margin = len(m.group(1))
                    mode   = mode_code

                else:
                    if not string.split( l ) and cur_lines:
                        # if the line is empty, we end the current paragraph,
                        # if any
                        para = DocPara( cur_lines )
                        self.items.append( para )
                        cur_lines = []
                    else:
                        # otherwise, simply add the line to the current
                        # paragraph
                        cur_lines.append( l )

        if mode == mode_code:
            # unexpected end of code sequence
            code = DocCode( margin, cur_lines )
            self.items.append( code )

        elif cur_lines:
            para = DocPara( cur_lines )
            self.items.append( para )

    def dump( self, prefix = "" ):
        if self.field:
            print prefix + self.field + " ::"
            prefix = prefix + "----"

        first = 1
        for p in self.items:
            if not first:
                print ""
            p.dump( prefix )
            first = 0

    def dump_lines( self, margin=0, width=60 ):
        result = []
        nl     = None
        for p in self.items:
            if nl:
                result.append( "" )

            result.extend( p.dump_lines( margin, width ) )
            nl = 1

        return result

# this regular expression is used to detect field definitions
#
re_field  = re.compile( r"\s*(\w*|\w(\w|\.)*\w)\s*::" )



class DocMarkup:

    def __init__( self, tag, lines ):
        self.tag       = string.lower(tag)
        self.fields    = []

        cur_lines = []
        field     = None
        mode      = 0

        for l in lines:
            m = re_field.match( l )
            if m:
                # we detected the start of a new field definition

                # first, save the current one
                if cur_lines:
                    f = DocField( field, cur_lines )
                    self.fields.append( f )
                    cur_lines = []
                    field     = None

                field     = m.group(1)   # record field name
                ln        = len(m.group(0))
                l         = " "*ln + l[ln:]
                cur_lines = [ l ]
            else:
                cur_lines.append( l )

        if field or cur_lines:
            f = DocField( field, cur_lines )
            self.fields.append( f )

    def get_name( self ):
        try:
            return self.fields[0].items[0].words[0]

        except:
            return None

    def get_start( self ):
        try:
            result = ""
            for word in self.fields[0].items[0].words:
                result = result + " " + word
            return result[1:]

        except:
            return "ERROR"

    def dump( self, margin ):
        print " "*margin + "<" + self.tag + ">"
        for f in self.fields:
            f.dump( "  " )
        print " "*margin + "</" + self.tag + ">"




class DocChapter:

    def __init__( self, block ):
        self.block    = block
        self.sections = []
        if block:
            self.name     = block.name
            self.title    = block.get_markup_words( "title" )
            self.order    = block.get_markup_words( "sections" )
        else:

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线视频一区二区| 国产精品美女久久久久久久| 亚洲与欧洲av电影| 91视频xxxx| 亚洲一级在线观看| 51精品国自产在线| 热久久免费视频| 337p粉嫩大胆噜噜噜噜噜91av | 欧美丝袜第三区| 亚洲综合小说图片| 7799精品视频| 国产裸体歌舞团一区二区| 国产亚洲一区二区三区四区| 成人av在线播放网站| 亚洲裸体xxx| 91精品综合久久久久久| 国产一区二区导航在线播放| 日本一区二区三区dvd视频在线| 成人一道本在线| 一区二区日韩av| 欧美成va人片在线观看| 不卡av在线免费观看| 亚洲午夜在线电影| 久久影院午夜片一区| 成人动漫一区二区在线| 亚洲大片一区二区三区| 日韩欧美高清在线| 99re在线精品| 青青草精品视频| 国产精品久久久久久久久免费丝袜 | 国产欧美在线观看一区| 日本久久电影网| 韩国成人精品a∨在线观看| 欧美国产精品一区二区三区| 欧美色电影在线| 国产成人精品亚洲日本在线桃色| 亚洲欧洲日产国产综合网| 制服.丝袜.亚洲.另类.中文 | 亚洲日本电影在线| 欧美一区二区三区播放老司机| 成人丝袜视频网| 日一区二区三区| 国产精品久久久久久久久免费桃花 | 亚洲影院免费观看| 久久午夜羞羞影院免费观看| 日本韩国一区二区| 国产一区高清在线| 三级不卡在线观看| 一区二区三区波多野结衣在线观看| 欧美大片免费久久精品三p| 99r精品视频| 国产成人精品免费网站| 日韩有码一区二区三区| 亚洲婷婷综合色高清在线| www激情久久| 5月丁香婷婷综合| 91麻豆自制传媒国产之光| 福利一区福利二区| 久久成人精品无人区| 午夜精品久久久久久不卡8050| 中文字幕在线一区二区三区| 欧美tickling网站挠脚心| 欧美日本国产一区| 日本二三区不卡| eeuss鲁片一区二区三区 | 国产精品久久久久久久久晋中| 日韩一区二区免费在线观看| 欧美日韩小视频| 91福利在线免费观看| 99精品国产91久久久久久| 国产91在线看| 国产精品 日产精品 欧美精品| 精品一区二区三区在线播放视频| 美女尤物国产一区| 午夜伦欧美伦电影理论片| 午夜av区久久| 五月天激情综合网| 性做久久久久久久免费看| 亚洲福利视频三区| 亚洲国产aⅴ天堂久久| 亚洲成人三级小说| 亚洲高清免费视频| 午夜欧美电影在线观看| 日本亚洲视频在线| 经典一区二区三区| 国产高清不卡二三区| 国产老女人精品毛片久久| 国产一区二区三区不卡在线观看| 国产精品一卡二卡在线观看| 国产精品一区在线观看乱码 | 久久男人中文字幕资源站| 久久综合色之久久综合| 亚洲国产精品v| 国产精品精品国产色婷婷| 一区二区三区四区不卡视频| 亚洲国产中文字幕| 视频一区欧美精品| 国产在线播精品第三| 成人免费黄色大片| 91国偷自产一区二区使用方法| 在线观看日韩高清av| 91精品国产一区二区三区蜜臀| 久久蜜桃av一区二区天堂| 欧美极品xxx| 亚洲成人激情社区| 极品瑜伽女神91| 成人av动漫网站| 欧美日韩亚洲国产综合| 亚洲精品一线二线三线| 亚洲三级久久久| 日韩影视精彩在线| 国产91丝袜在线观看| 欧美日韩1区2区| 久久久久免费观看| 亚洲国产成人va在线观看天堂| 久久99国产精品久久99| 不卡视频一二三四| 日韩午夜在线观看| 国产精品久久精品日日| 免费三级欧美电影| 91在线视频播放地址| 欧美高清一级片在线| 国产精品久久久久久久浪潮网站| 日韩高清不卡在线| 不卡的av电影在线观看| 日韩一级片在线播放| 亚洲婷婷综合色高清在线| 麻豆精品视频在线观看免费| 成人动漫一区二区三区| 欧美精品在线视频| 国产精品三级电影| 免费高清在线视频一区·| 91小宝寻花一区二区三区| 日韩午夜三级在线| 亚洲欧美国产三级| 国模冰冰炮一区二区| 欧美日韩国产成人在线免费| 国产精品无码永久免费888| 日产国产欧美视频一区精品| 91久久一区二区| 欧美国产日韩一二三区| 久久99国产精品麻豆| 欧美日韩视频在线第一区 | 精品一二三四区| 欧美三级欧美一级| 亚洲欧美日韩久久精品| 国产精品一区二区三区99| 日韩一区二区三区电影在线观看 | 亚洲第一会所有码转帖| www.66久久| 国产日韩欧美精品综合| 美女在线一区二区| 欧美一级夜夜爽| 五月天国产精品| 欧美午夜精品久久久久久超碰 | 久久久久国产精品麻豆ai换脸 | 日本强好片久久久久久aaa| 99亚偷拍自图区亚洲| 国产色一区二区| 久久精品噜噜噜成人88aⅴ| 欧美一区二区三区四区视频| 亚洲一区二区欧美| 99re热视频精品| 亚洲欧洲av一区二区三区久久| 国产成人综合亚洲网站| 日韩欧美美女一区二区三区| 天天操天天综合网| 777欧美精品| 日韩成人午夜精品| 欧美日韩国产精品成人| 性欧美疯狂xxxxbbbb| 在线亚洲欧美专区二区| 亚洲午夜一区二区三区| 欧美日韩在线不卡| 亚洲乱码国产乱码精品精可以看| 色综合久久中文综合久久97| 亚洲欧洲日产国产综合网| 91麻豆.com| 国产精品灌醉下药二区| 日本高清不卡视频| 亚洲国产另类av| 欧美一卡二卡在线观看| 裸体健美xxxx欧美裸体表演| 欧美成人一区二区三区在线观看 | 国产麻豆视频一区二区| 国产女人aaa级久久久级| av激情亚洲男人天堂| 成人免费在线播放视频| 欧美中文字幕不卡| 天天av天天翘天天综合网 | 欧美日韩一区二区三区四区| 亚洲一区在线播放| 91麻豆精品国产91久久久久久久久 | 2022国产精品视频| 成人毛片在线观看| 91麻豆精品91久久久久同性| 精品伊人久久久久7777人| 国产精品不卡在线| 欧美午夜寂寞影院| 高清免费成人av|