Re: Trying to understand preprocessor
- Posted by jimcbrown (admin) Feb 09, 2013
- 1408 views
moskito_x said...
README file |
---|
To run this example, at the command prompt type: |
eui etmltest.ex |
Sounds like an error in the docs, it should have a name afterwards.
moskito_x said...
With <name> hello.etml
D:\euphoria-405\demo\preproc>eui etmltest.ex hello.etml <html> <head><title>Hello, hello.etml</title></head> <body> <h1>Say Hello</h1> <p>Hello, hello.etml!</p> <p>Hello, hello.etml!</p> <p>Hello, hello.etml!</p> <p>Hello, hello.etml!</p> <p>Hello, hello.etml!</p> <p>Hello, hello.etml!</p> <p>Hello, hello.etml!</p> <p>Hello, hello.etml!</p> <p>Hello, hello.etml!</p> <p>Hello, hello.etml!</p> </body> </html>
That worked correctly. Why did you think otherwise? (etml is an "Euphoria-like" superset of HTML that, after running through the preprocessor, is converted to plain HTML.)
moskito_x said...
Now see what really happens.
D:\euphoria-405\demo\preproc>eui -p eui:datesub.ex thedate.ex The date this was run is @DATE@
surprised ? I also
Others attempts
file thedate.dex
puts(1, "@DATE@\n")
Let's try thedate.dex (with a pre-processor hook defined).
D:\euphoria-405\demo\preproc>eui -p eui:datesub.ex thedate.dex Can't open 'D:\euphoria-405\demo\preproc\thedate.dex'
You need to name it thedate.eui - or else use the hook as -p dex:datesub.ex
Using -p eui: with the .ex extension sounds like another error in the docs.