lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


----- Original Message ----- 
From: "Srivatsan Raghavan" <vraghavan@cnmnetwork.com>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Thursday, September 05, 2002 8:51 PM
Subject: odd thing 


> 
> but i'm wondering why lua's string handling functions use a strange 
> pseudo-regex syntax as
> opposed to the well-known syntax that's used by everyone else?
> 

This is really just a guess, but I would beleive this is because the
full blown regular expression functions are not part of the ANSI C
standard.  Many platforms/compilers do not have the regex() and co.
of functions.

I have looked at the source for these functions, and they are quite
large; so I think the simplified version was selected becuase it
would more easily fit in embeded systems.

>
> on that note, i'm considering writing a wrapper for pcre ( www.pcre.org 
> ) to lua ..
> 
> can anyone give any suggestions on where i can start learning the lua C 
> api ?
> 

The reference manual that comes with Lua explains the API quite nicely
(IMHO) and is rather easy to use.  Wraping regex() or other such functions
into a Lua module should be a snap.

Good Luck!
Kelmar K. Firesun (IRL: Bryce Simonds)