PFAC_readPatternFromFile() should parse escape character

3 views
Skip to first unread message

Lung-Sheng Chien

unread,
Mar 2, 2011, 3:31:58 AM3/2/11
to pfacForum
I think it is not difficult to parse escape character.

complete set of escape sequence should include

\a alert character
\b backspace
\f formfeed
\n newline
\r carriage return
\t horizontal tab
\v vertical tab
\\ backslash
\? question mark
\' single quote
\" double quote
\ooo octal number
\xhh hexadecimal number

Lung-Sheng Chien

unread,
Mar 2, 2011, 5:06:44 AM3/2/11
to pfacForum
besides, line termination should be considered together.

windows file system use a two-character sequence carriage return
followed by line feed (or CRLF) to terminate each line of a text file.
We can provide a flag to remove carriage return.

Lung-Sheng Chien

unread,
Mar 3, 2011, 8:43:02 PM3/3/11
to pfacForum

So far, we agree with this simple parser update for next release.

1) support escape character
2) support removal of carriage return
3) space-efficient version of PFAC_matchFromDevice() and
PFAC_matchFromHost()

Later, we need to focus on a complete parser which can parse full set
of regular expression.
However we may not support full set regular expression in PFAC
library.
> > \xhh hexadecimal number- 隱藏被引用文字 -
>
> - 顯示被引用文字 -
Reply all
Reply to author
Forward
0 new messages