| Author |
| Thread |
 |
|
|
|
f0dder wrote: |
|
I took a brief look at Gold Parser some years ago, looked interesting, but never got around to using it. Not really a replacement for a RegEx engine either, imho.
Anyway, the assembly engine implementation looked pretty trivial, I wouldn't be surprised if it's actually beaten by a decent compiler; would be interesting to see some speed tests.
|
|
Yea its a different sort of monster from a RegEx. The performance is pretty bad in the engines I've used, I imagine the asm engine doesn't perform so well either. But for its purposes it works pretty well.
|
16 Feb 2007, 01:01 |
|
mrpink
Joined: 03 Jun 2005
Posts: 27
Location: Germany
|
Hello Ozzy.
Pelles C standard library actually does not use PCRE. (At least the version that I have.) It comes with (a modified version of) Henry Spencer's regex library.
http://arglist.com/regex
Hello f0dder.
Nothing is wrong with PCRE. Ignore this thoughtless and stupid comment. What I really wanted to say is that you should also consider other libraries. As
tantrikwizard already mentioned you should choose the library that suits your and your potential users needs. Using PCRE has a lot of advantages, for
example, everbody familiar with PERL will feel right at home with your application. It also supports portability of regexes between your application and PERL.
vid wrote:
Unless anybody provides a counter-example, it is error free code.
The current implementation status of regcomp is as follows:
- leftmost longest match (returns start and end of a match)
- leftmost shortest match (returns start and end of a match)
- character classes
- case insensitivity
- backward searching
- minimum match length
The next step is adapting regexec.
I think I'll release the next version on 02/28/07.
By the way, does anybody of you have an idea of how to identify the longest string that must occur in every match? I've heard that grep is able to do that and
then uses a fast exact string matcher like quicksearch to speed up the search.
|
19 Feb 2007, 09:17 |
|
Tomasz Grysztar
Assembly Artist
Joined: 16 Jun 2003
Posts: 5287
Location: Kraków, Poland
|
mrpink wrote: |
|
Unless anybody provides a counter-example, it is error free code.
|
|
And when someone provides a counter-example, it miraculously changes to bee an erroneous code, without having a single byte altered? 
|
19 Feb 2007, 09:45 |
|
mrpink
Joined: 03 Jun 2005
Posts: 27
Location: Germany
|
Clearly, if somebody provides a counter-example then it actually has never been error-free code. Although I did not proved the code correct(yet), I'm very sure it is. Thus the claim. 
|
20 Feb 2007, 07:48 |
|
rugxulo
Joined: 09 Aug 2005
Posts: 1931
Location: Usono (aka, USA)
|
mrpink wrote: |
|
I think I'll release the next version on 02/28/07.
|
|
No hurry.
FYI, xgrep 1.03 (DOS, 8086) is now available (soon to be officially part of FreeDOS?) w/ .ASM src. Hooray!
EDIT: Post #786 (via my P4, a so-called 786, heh).
|
16 Mar 2007, 04:11 |
|
0.1
Joined: 24 Jul 2007
Posts: 474
Location: India
|
I just saw it today!
Very impressive mrpink!
|
25 Jul 2007, 10:53 |
|
semiono
Joined: 31 Aug 2007
Posts: 166
Location: section '.code' executable
|
Thanks!
|
30 Aug 2010, 21:15 |
|
mrpink
Joined: 03 Jun 2005
Posts: 27
Location: Germany
|
hi there,
i've done some updates and extensions to the regex engine.
it now passes almost all tests in basic.dat from:
http://www2.research.att.com/~gsf/testregex/
code size is about 8.8k including the code needed for running
it as an egrep-like commandline tool.
if somebody is interested and has a real project to include it
or has an idea for its usage let me know.
|
09 Jun 2011, 19:04 |
|
XVilka
Joined: 04 May 2011
Posts: 41
Location: Russia
|
mrpink, I'm interested in this project, i'm working on using this library as tinypy module for KolibriOS. Please, upload here your new version. Thx for great work!
|
10 Jun 2011, 05:06 |
|
mrpink
Joined: 03 Jun 2005
Posts: 27
Location: Germany
|
hello XVilka, what is your project about? please tell me a little bit about it.
maybe you can share your source code and we can work together to find
the best solution how to integrate my code with yours. you might need
some additional stuff like support for cyrillic/russian character set and
other regex syntax than posix ere.
|
11 Jun 2011, 06:25 |
|
XVilka
Joined: 04 May 2011
Posts: 41
Location: Russia
|
|
16 Jun 2011, 15:49 |
|
mrpink
Joined: 03 Jun 2005
Posts: 27
Location: Germany
|
sorry but I still don't understand. do you need to call it from C? please
tell me a more about Your code 
|
18 Jun 2011, 08:47 |
|
XVilka
Joined: 04 May 2011
Posts: 41
Location: Russia
|
Sorry for big delay.
Yes. I need call it from C (or from fasm, if TinyPy will be rewritten on fasm). It is for implementing "re" module for tinypy. And of course, this library can be system-wide for KolibriOS, and for other its programs.
|
04 Jul 2011, 06:31 |
|
Antares
Joined: 23 Jan 2006
Posts: 4
|
If it supports most of the syntax, it has long desired solution. I have long waited for such a project, but unfortunately before they had very limited support for syntax.
|
15 Jul 2011, 16:05 |
|
Matrix
Joined: 04 Sep 2004
Posts: 1009
Location: Overflow
|
cool, writing coreutils in FASM?
i'm in
ps.:
REGEXP rulz
|
03 Nov 2011, 15:29 |
|
mrpink
Joined: 03 Jun 2005
Posts: 27
Location: Germany
|
Hi all. I've updated the code, added some features and renamed the package.
Check it out.
|
12 Dec 2012, 17:55 |
|
JohnFound
Joined: 16 Jun 2003
Posts: 2597
Location: Bulgaria
|
Hi, mrpink.
I just downloaded your code. It is really impressive work. But I have some advices about your coding style:
1. Never use "fix" directive at all. It is provided for very specific tasks. The usual program should never use it at all.
2. Also, don't use "equ" to define numeric constants. Use "=" instead.
Actually in your code all numeric constants should be defined with "=". I don't know why you are using "fix" and "equ"???
|
12 Dec 2012, 20:09 |
|
mrpink
Joined: 03 Jun 2005
Posts: 27
Location: Germany
|
Well, when I started this project in 2007 I thought it is best to use fix
for constants you don't want to be overridden accidentally as fasm would do with constants defined with equ.
What are those very specific usages of fix you're talking about? I just thought, they're there for defining constants you wouldn't want to be redefined somewhere.
Anyway, is there any harm done by using fix and equ the way I did?
And thanks for your appreciation. I really like your work too. Keep it up.
|
12 Dec 2012, 21:24 |
|
JohnFound
Joined: 16 Jun 2003
Posts: 2597
Location: Bulgaria
|
mrpink wrote: |
|
Anyway, is there any harm done by using fix and equ the way I did?
|
|
It is relative, but for example, these constants (because they are preprocessor constants) can't be used with Fresh IDE code completion, cross reference, and all code exploration tools.
_________________ Never use "goto"! Use "jmp" instead!
|
13 Dec 2012, 06:00 |
|
mrpink
Joined: 03 Jun 2005
Posts: 27
Location: Germany
|
Now, is that my bad coding style or a weakness of Fresh IDE?
Anyway, shouldn't be a problem to do a search and replace for all fixes and equs
Hope to see my code in one of your projects though 
|
13 Dec 2012, 23:43 |
|
|
|
Forum Rules:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
|
|
|
|
Powered by phpBB © 2001-2005 phpBB Group.
|