Thanks Scott,
I feel like I am in another whirlwind!! Yet another language learning experience,
sigh. But this one seems to have good potential, so I don't want to give up
unnecessarily.
There are two capabilities I have coded in the past that I would like to code in Rebol:
1. I have a language generator which reads a high-level driver file containing named
sets of attributes. The name is a dot name (parent/child) followed by attribute
name/value pairs. I read this driver specification and depending on the language
(directory of templates), I then apply template files (which contain these macros)
based on the "type" attribute of the object in the high level specification.
EXAMPLE:
CONTROL:language=Java1.3:.....etc.
MEI:title=Manufacturing & Engineering Interface:type=JApplication:.....etc.
MEI.Splash:type=JPanel:bgc=red:....etc.
The types "JApplication" and "JPanel" (etc) would connect up to a corresponding
template file which is read and text is emitted to the module file, with macros
controlling the action.
The JPanel template file might have this line in it:
if defined(bgc)
setBackground(Color.$(bgc));
.endif
2. I have a configuration library which uses RDBMS tables to hold the configuration
information in LN,VN,VV (3 columns - LabelName, VariableName, VariableValue). The VV
may contain such embedded macros which may resolve to program variables, environment
variables, scoped dataset (VN) variables, or distant references to other parts of the
RDBMS configuration table set.
EXAMPLE: LN VN VV
Task1 homedir $(bindir)/$(apname)
I would have no problem changing my current representation to a Rebol one if I knew
what it should be.
At any rate, I need to be able to resolve/find these macros, so that is the reason for
the original question.
Dick
> ** Original Subject: [REBOL] Re: Embedded macros ..
> ** Original Sender: "G. Scott Jones" <[EMAIL PROTECTED]>
> ** Original Date: Mon, 9 Sep 2002 13:28:15 -0500
> ** Original Message follows...
>
> From: Dick Ulrich
>
> Regarding message:
> http://www.escribe.com/internet/rebol/m25365.html
>
> > >> print Embed "Hello$(a)"
> > ** Script Error: Alpha has no value
> > ** Where: Embed
> > ** Near: parse String: copy String Rule:
> > >> print Embed "Hello $(a) "
> >
> > Wish I knew how to debug this to see what is happening.
>
> Hi, Dick,
>
> I must say that Andrew's example is fairly advanced, and he warns that the
> recursive feature is not quite right yet. But the problem that you have run
> into is that he apparently forgot to supply you the some rule definitions.
> These may work:
>
> digit: charset [#"0" - #"9"]
> alpha: charset [#"A" - #"Z" #"a" - #"z"]
> alphadigit: union alpha digit
>
> I was going to under take to explain his example more fully, and then I
> realized that I wasn;t quite sure what he was intending in a few spots.
> Depending on your ultimate needs, there may be an easier way to accomplish
> the task. (We all suffer the paradigm shift problem of "I know how to do
> blah, blah in this or that language, but how do I do it in REBOL?")
>
> Andrew is a New Zealander, so he should be awake later in our day (central
> time zone) and will likely help.
> --Scott Jones
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>** --------- End Original Message ----------- **
>
Download NeoPlanet at http://www.neoplanet.com
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.