flat assembler
Message board for the users of flat assembler.
Index
> Main > Feature Request: Regular Expressions Goto page 1, 2 Next |
Author |
|
dickhead 30 Nov 2003, 12:45
hi art_sands,
what is regular expressions. i never headr of it in other assemblers. blabla _________________ teach me or i'll dick ya. |
|||
30 Nov 2003, 12:45 |
|
art_sands 30 Nov 2003, 14:51
Well
You haven't heard of regular expressions may be because you're rather new to programming. There are C libraries like PCRE and GNU regexp which offer them. Regular expressions are very useful in parsing and matching. They are basically one form of pattern matching (which I think you may also have never heard of). Randy Hyde's book has an excellent chapter on pattern matching and his HLA also has it built in its standard library. Regards, Art |
|||
30 Nov 2003, 14:51 |
|
Tomasz Grysztar 30 Nov 2003, 14:57
Can you explain what did you mean by "built-in"? Being a part of standard library is something different from being built-in into the compiler/assembler.
|
|||
30 Nov 2003, 14:57 |
|
art_sands 30 Nov 2003, 15:04
Oh that,
Sorry my mistake. Yeah, it should be "built into the standard library" with FASM. Regards, Art |
|||
30 Nov 2003, 15:04 |
|
JohnFound 30 Nov 2003, 16:25
art_sands wrote: Oh that, BTW: StrLib.asm is a part of Fresh "standard library" . There should be something similar to regular expresions, but still no one write it. |
|||
30 Nov 2003, 16:25 |
|
Kain 30 Nov 2003, 18:22
nm
|
|||
30 Nov 2003, 18:22 |
|
fasm9 30 Nov 2003, 21:33
yes. we need regex(regular expression).
the regex in asm very different from regex in C/perl/C++/C#. if it can be done, it will be more easy to make masm2FASM, C# 2 FASM translator. -- Last edited by fasm9 on 01 Dec 2003, 11:58; edited 1 time in total |
|||
30 Nov 2003, 21:33 |
|
pelaillo 01 Dec 2003, 09:14
PCRE library is small and easy to use in assembly projects.
And is ready to use for any purposes, so you don't need to wait until someone codes a full regexp in fasm. |
|||
01 Dec 2003, 09:14 |
|
art_sands 01 Dec 2003, 09:43
Also,
Windows has a scripting regexp library (available with WSH 5.6) that is made available to asmers via COM, but that is only if you know COM properly. PCRE is much easier than doing it in COM. Regards, Art |
|||
01 Dec 2003, 09:43 |
|
fasm9 01 Dec 2003, 12:02
pelaillo wrote: 1.PCRE library is small and easy to use in assembly projects. 1. Hi, Did you mean this? http://www.pcre.org/ 2. no, not all purposes, it can be used for C++ base, but you can't use PCRE for FASM. -- |
|||
01 Dec 2003, 12:02 |
|
pelaillo 01 Dec 2003, 12:40
fasm9 wrote: 2. no, not all purposes Why not? It's a DLL that you can call from your fasm code. |
|||
01 Dec 2003, 12:40 |
|
art_sands 01 Dec 2003, 16:34
Hi there,
I had tried using it for MASM I made some incs from the headers and the libs, I posted it in the Win32 ASM Community forum, so you might be able to find it there: http://board.win32asmcommunity.net/showthread.php?s=03f126d3c6539c96323fc6b6a1fcd81d&threadid=15797&highlight=pcre Regards, Art |
|||
01 Dec 2003, 16:34 |
|
pelaillo 01 Dec 2003, 20:17
Here is a test in FASM for using PCRE.
The file pcre.exe will find a regex that matches within the source file pcre.asm
|
|||||||||||
01 Dec 2003, 20:17 |
|
fasm9 01 Dec 2003, 20:56
sorry,
But still i believe it's useless for FASM. especially, compiler design, language unity. i.e. not application side. -- i could be wrong. |
|||
01 Dec 2003, 20:56 |
|
pelaillo 02 Dec 2003, 09:15
fasm9 wrote: But still i believe it's useless for FASM. especially, compiler design, language unity. i.e. not application side. sorry, I don't follow you. Regular Expression parser is are multipurpose and useful tool that permit to do many things, some of them simple but some others could be very complex. One of the diamond tools of perl programmers. An immediate use is for advanced search and replace operations. |
|||
02 Dec 2003, 09:15 |
|
dickhead 02 Dec 2003, 10:54
mr. pelailo
can u give me a simple eg. coz i'm new to this and the above eg just went over my head. bla bla _________________ teach me or i'll dick ya. |
|||
02 Dec 2003, 10:54 |
|
pelaillo 02 Dec 2003, 13:37
Sure, give me some time to prepare an explanation. In the mean time try playing with the example.
The body is a subclassed edit box that receives function keys. |
|||
02 Dec 2003, 13:37 |
|
Randall Hyde 03 Dec 2003, 19:26
art_sands wrote: I don't need to justify the fact that regular expressions are extremely powerful. But since, regexps for asmers are rarely available except for HLA, which has pattern matching, I would love FASM to have regular expressions built-in. Actually, you can call the HLA pattern matching routines from FASM. There are only a couple of difficulties: 1. the nice syntax that the HLA standard library code uses is based on HLA's macro facilities, which aren't available in other assemblers. Still, you can make up your own macros or call the routines in a "bare" manner. 2. The HLA Standard Library pattern matching routines use character sets. Generating character set constants by hand is a real pain in the butt. I tried to do it with MASM's macros once, but failed miserably. Without character sets, you lose at least half the power of the pattern matching libraries. Of course, you can always write a little utility into which you type a character set and it spits out the data for the character set to include in your FASM code. Another alternative is to write the pattern matching sequence with HLA, turn on FASM output, and copy that code into your FASM application. Cheers, Randy Hyde |
|||
03 Dec 2003, 19:26 |
|
Betov 03 Dec 2003, 22:29
I suppose it could be also possible to call Vbrun from FASM also, if someone knows the calling convention... but who would like to?
Betov. |
|||
03 Dec 2003, 22:29 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.