Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Embedded macros ..

From: reffy:ulrich at: 9-Sep-2002 14:00

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