lua-users home
lua-l archive

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


On Monday 25 July 2005 12:17, Dave Dodge wrote:
[...]
> I only mention this stuff because I was working on a C parser (sorry,
> not in Lua) in recent weeks and ran into all of this myself.

Yeah, I've done one myself. It sucks. (Not to mention the fact that C and C++ 
will let you define new keywords, which are parsed differently depending on 
their type... eeah. What does '*fnord' mean? It depends on whether 'fnord' is 
a type or a value...)

The two things I worked out are:

(a) only look at the code *after* the preprocessor has had a chance to run, 
and

(b) whenever possible, cheat like mad. You don't need to understand 
everything, just enough to do the job.

Lua's a much simpler language and should be anything like as hard.

-- 
+- David Given --McQ-+ "I told you to make one longer than another, and
|  dg@cowlark.com    | instead you have made one shorter than the other --
| (dg@tao-group.com) | the opposite." --- Sir Boyle Roche
+- www.cowlark.com --+ 

Attachment: pgpRg3l9tAI19.pgp
Description: PGP signature