Author Topic: Regular Expressions  (Read 4922 times)

jcfuller

  • Guest
Regular Expressions
« 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
« Last Edit: September 12, 2010, 11:02:57 am by jcfuller »

JRS

  • Guest
Re: Regular Expressions
« Reply #1 on: September 12, 2010, 10:46:17 am »
I use the ScriptBasic Regular Expression extension module from time to time. Are you thinking of creating a library?




jcfuller

  • Guest
Re: Regular Expressions
« Reply #2 on: September 12, 2010, 11:04:30 am »
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

rdc

  • Guest
Re: Regular Expressions
« Reply #3 on: September 12, 2010, 01:24:49 pm »
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.

JRS

  • Guest
Re: Regular Expressions
« Reply #4 on: September 12, 2010, 02:48:16 pm »
James,

It might be worth looking at the ScriptBasic's parser and instead of creating a token, increment the C(++) run time function reference count.

Steve A.

  • Guest
Re: Regular Expressions
« Reply #5 on: September 12, 2010, 04:18:03 pm »
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).

Pjot

  • Guest
Re: Regular Expressions
« Reply #6 on: September 13, 2010, 12:07:27 am »
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.

Peter