www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/02/07/18:00:46

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
From: Christian Riggenbach <criggenbach AT magahugu DOT ch>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] Using Lua to safely read configuration and layout files (program attached)
Date: Sun, 08 Feb 2015 00:00:23 +0100
Message-ID: <32380475.xlWdxyhFd9@jasum>
User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; )
In-Reply-To: <201502072235.t17MZuaZ025960@envy.delorie.com>
References: <CAOFvGD7pJTo8A=MXVbuuXO=++0vGukUyqVfckVtnCi99ziqWJQ AT mail DOT gmail DOT com> <2047684 DOT lX4NXpYgtQ AT jasum> <201502072235 DOT t17MZuaZ025960 AT envy DOT delorie DOT com>
MIME-Version: 1.0
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Saturday 07 February 2015 17.35:56 you wrote:
> One thing to keep in mind when saying "lua is only for expressions" is
> to remember that our expressions have *units* (mm, mil, etc) on them.
> 
> Can lua parse "3mm + $n * 10mil" ?

To state the obvious: yeah, that would be a problem. Either code the unit-
system in the core (hard to maintain), use something as trivial as "3*mm + $n 
* 10*mil" and define mm end the other units as factors (hard to read). And 
unit-parsing on an higher level would negate the added benefit of a parser in 
the first way.

-- 
mit freundlichem Gruss

Christian Riggenbach

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019