Euphoria
Ticket #192:
preprocessing with processor option demo is not getting preprocessed
-
Reported by
SPringle
Aug 18, 2010
hello.lex works fine. However, thedate.dex does not.
The difference is that the preprocessor itself of the dex takes an option...
eui -p "dex:datesub.ex:-f %m/%d/%Y" thedate.dex
The eu.cfg file is: -p etml:etml.ex -p le,lex:literate.ex -p dex:datesub.ex:"-f %m/%d/%Y"
Details
1. Comment by mattlewis
Oct 22, 2010
The preprocessor code was using #find_replace() still instead of match_replace(). Also, the eu.cfg file was incorrect in the command line options. Removed those, since the file assumes a sane default.
2. Comment by jeremy
Oct 24, 2010
Added the command line options back in as a demo of how to accomplish that task. It works just fine in my tests:
eu.cfg:
-p dex:datesub.ex:-f %m/%d/%Y
The pre-processor understands the first group to be extensions, it could be "de,dex,dexx" The next group (actually just one item) is the command to execute for the pre-processor... which can be a euphoria script, an executable or a DLL designed to function as a preprocessor. The last group is optional and it's simply arguments passed on to the preprocessor.
In the eu.cfg file, you do not need quotes and it's one option per line. When running via the command line you would have to quote your option value. For example:
eu.cfg:
-p dex:datesub.ex:-f %m/%d/%Y
or
via command line:
$ eui -p "dex:datesub.ex:-f %m/%d/%Y"