Open mingodad opened 3 years ago
Class Regex was historically part of module sys, from which it was removed to separated module regex. Demo example was not fixed from since then. Fixed in (e246ee9c0304c2a28641054cb25a0c5641dd515b). Thank you for noticing.
There are three sources of directories to be searched for modules:
.
and modules
.-mods=
. Argument should precede name of script and should contain directories separated by colon. Eg. -mods=DIR1:DIR2:DIR3
.UCLANG_MODS_PATH
, containing directories separated by colon. Eg. export UCLANG_MODS_PATH=DIR1:DIR2:DIR3
In both cases directories can be absolute or relative.
Thank you for reply !
Would be nice if that information could be available from command line like uclang -h
or uclang --help
.
When I mentioned about relative path for import
I was meaning something like import ../tutorial;
.
I will occasionally add --help
argument, and also change existing arguments from some weird combination of short/long version eg. -mods
to long version eg. --mods
.
You are right, module to be imported is identified just by its name (identifier). Module implementation is looked for in module directories mentioned in previous comment.
Testing this project and trying to execute 'uclang/demos/imx_sdma/main.ucl' I'm getting this error message:
And after adding 'import regex;' to 'uclang/demos/imx_sdma/assembler.ucl' no error reported.
Another issue I'm having when trying to execute 'uclang/examples/*' directly it doesn't due to not having the 'export UCLANG_MODS_PATH=' set and it doesn't seem that we can us import with relative paths.