AllBASIC Forum
BASIC Developer & Support Resources => Open Forum => Topic started by: jcfuller on September 12, 2010, 10:27:04 AM
-
Just curious if any of the authors make use of a regular expression library for parsing in their interpreters, compilers, or translators?
James
-
I use the ScriptBasic Regular Expression extension module from time to time. Are you thinking of creating a library?
-
I use the ScriptBasic Regular Expression extension module from time to time. Are you thinking of creating a library?
No.
I rephrased my question!
James
-
Just curious if any of the authors make use of a regular expression library for parsing in their interpreters, compilers, or translators?
James
Lex uses regular expressions to parse the syntax, and I am sure most commercial use something similar to Lex. Most home-brew systems I have seen don't.
-
James,
It might be worth looking at the ScriptBasic's parser (http://www.scriptbasic.org/docs/dg/devguide_toc.html) and instead of creating a token, increment the C(++) run time function reference count.
-
Just curious if any of the authors make use of a regular expression library for parsing in their interpreters, compilers, or translators?
I do not, in Bxbasic.
My parser is entirely "home spun".
In years past, I played around (extensively) with the Perl Regex library and found it quite amusing to say the least.
I tinkered with the idea of incorporating it into Bxbasic, but, never got around to it.
For the lay-person, Regex can appear very complex, (at first).
-
Yes, I do use the "POSIX Extended Regular Expressions" which comes with the C library in <regex.h>. See also 'man regex' or this link (http://linux.die.net/man/7/regex).
Peter