SUMTEC -- There's a thing in my bloglet.

But it's not only one. It's many. It's the same as other things but it exactly likes nothing else...

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

点击这里下载(请首先看完下面的说明后再继续使用)
预览画面:



说明:这个只是一个概念演示版本,仅仅演示“自动着色”功能,目前没有任何的存盘功能和智能提示等功能。并且还有一部分的着色没有完成,没有完成的部分将在下一个版本里面看到。目前大家可以做的是,看看这个自动着色器的速度和效果。关于速度,日后会有一定的优化,不过可能并不会比目前快超过一个数量级。
在这个压缩文件包当中有一个后缀为NGARPT的文件,这个文件是必须的,不能够删除,并且必须和EXE文件放在同一个目录下面。该文件的内容就是对上面那个文本框内部输入的字符进行分析的正则表达式内容,其中第一行(不包括自动换行)的内容是语法分析,第二行是用于找出“语句”的分隔点,以便进行局部分析(而不是耗费时间的全局分析)。
上图中,右边的方框用于演示如何“暂停”RichTextBox的刷新,点击Begin之后将会暂停(用其它窗口覆盖在这个文本框上面再拿开就可以看到效果了),点击End的次数等于点击Begin的次数将会恢复刷新。下面这部分是计划当中的“头文件”,有兴趣可以看一下:

/ File name:   Version2.txn
/ Create time: 2004-07-23
/ Creator:     sumtec

/ This file defines the version of the TXN file to version 2.
/ This will enable the version 2 syntax.

/ These lines defines the version.
@ifdef version

@warning "Version is already defined in file {1} at line {2} as Version \"{0}\"." version version.File version.Line

@endif /version

@version 2.0


/ File name:   Version.txn
/ Create time: 2004-07-23
/ Creator:     sumtec

/ This file defines the version of the TXN file to version 1.
/ \<xxx> will turns into <xxx>

@ifdef version

@ifdef version

@warning "Version is already defined in file {1} at line {2} as Version \"{0}\"." version version.File version.Line

@endif /version

@version 1.0

/ File name:   Options.txn
/ Create time: 2004-07-23
/ Creator:     sumtec
@option trace >
@option capture ?
@option regex "is-x" / This is incorrect!


/ File name:   Symbols.txn
/ Create time: 2004-07-23
/ Creator:     sumtec

@ifndef _Symbols_Defined
@define _Symbols_Defined

@sealcapture begin

#_cBacklash:\
#_cRegexEscape:<Backlash>
#_cLeftRoundBracket:(
#_cRightRoundBracket:)
#_cLeftSquareBracket:[
#_cRightSquareBracket:]
#_cLeftPointBracket:<
#_cRightPointBracket:>
#_cLeftCurlyBracket:{
#_cRightCurlyBracket:}
#_cPipeline:|
#_cColon::
#_cSemiColon:;
#_cComma:,
#_cDot:.
#_cExcalmatoryMark:!
#_cQuestionMark:?
#_cAsterisk:*
#_cPlus:+
#_cMinus:-
#_cEqual:=
#_cUnderline:_
#_cEmailAt:@
#_cSharp:#
#_cDollar:$
#_cPercentage:%
#_cUpPoint:^
#_cAndMark:&
#_cSlash:/
#_cDoubleQuote:"
#_cSingleQuote:'

@sealcapture end

@endif / _Symbols_Defined


/ File name:   Operators.txn
/ Create time: 2004-07-23
/ Creator:     sumtec

@ifndef _Operators_Defined
@define _Operators_Defined

@include Symbols.txn

@sealcapture begin

_m_cStart:<cLeftSquareBracket>
_m_cEnd:<cRightSquareBracket>
_m_cInverse:<cUpPoint>

_m_gStart:<cLeftRoundBracket>
_m_gEnd:<cGroupRoundBracket>
_m_gOr:<cPipeline>

_m_dStart:<cLeftRoundBracket><cQuestionMark><cLeftPointBracket>
_m_dDefine:<cRightPointBracket>
_m_dEnd:<cRightRoundBracket>

_m_rFrom:<cLeftCrulyBracket>
_m_rTo:<cComma>
_m_Repeat:<cRightCrulyBracket>
_m_somethingLazy:<cQuestionMark>
_m_lazyRepeat:<_m_Repeat><_m_somethingLazy>

_m_any:<cAsterisk>
_m_many:<cPlus>
_m_one:<cQuestion>

_m_lazyAny:<_m_any><_m_somethingLazy>
_m_lazyMany:<_m_many><_m_somethingLazy>
_m_lazyOne:<_m_one><_m_somethingLazy>

@sealcapture end

@endif / _Operators_Defined

/ File name:   Escapes.txn
/ Create time: 2004-07-23
/ Creator:     sumtec


#_escape_Operator:<cRegexEscape>
#_escape.Char:<_escape_Operator><_escape_Operator>

@ifndef _Escapes_Defined
@define _Escapes_Defined

@include Symbols.txn

@sealcapture begin

#_Escape:<RegexEscape>
#_EscapeMark:<_Escape><_Escape>
#_lrBracket:<_Escape><cLeftRoundBracket>
#_rrBracket:<_Escape><cRightRoundBracket>
#_lsBracket:<_Escape><cLeftSquareBracket>
#_rsBracket:<_Escape><cRightSquareBracket>
#_lpBracket:<_Escape><cLeftPointBracket>
#_rpBracket:<_Escape><cRightPointBracket>
#_Dot:<_Escape><_cDot>
#_Asterisk:<_Escape><_cAsterisk>
#_PlusSign:<_Escape><_cPlus>
#_Question:<_Escape><_cQuestion>
#_Pipeline:<_Escape><_cPipeline>
#_MinusSign:<_Escape><_cMinus>
#_UpPoint:<_Escape><_cUpPoint>

@sealcapture end

@endif


/ File name:   Base.txn
/ Create time: 2004-07-23
/ Creator:     sumtec

@include Version2.txn
@include options.txn
@include operators.txn
@include escapes.txn
@include spaces.txn

posted on 2004-07-28 11:40  Sumtec  阅读(1524)  评论(0编辑  收藏  举报