The Sol Programming Language!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.8 KiB

  1. ./sol [<options> [<arg> [<arg> ...]]]
  2. Sol Executive - compiles and/or runs a Sol program.
  3. Options given to Sol are given via the first argument. For options that take
  4. parameters, they are read in the order specified in the option argument; e.g.,
  5. "./sol ab a.foo b.bar" and "./sol ba b.bar a.foo" are equivalent, assuming
  6. options "a" and "b" take arguments.
  7. Sol currently recognizes the following options:
  8. -d: Sets yydebug=1, which enables debug tracing of the parser/lexer.
  9. -D: Sets debugging within the language runtime itself.
  10. -t: Prints the Sol syntax tree after program loading.
  11. -i: Ignore any initialization files. By default, Sol executes any of these
  12. files, if they exist and are readable, in the initial environment in this
  13. order:
  14. - /etc/sol/init.sol
  15. - /opt/sol/init.sol
  16. - $HOME/.config/sol/init.sol
  17. These may be overridden during compilation.
  18. -r <file>: Read the program from the file, instead of the default (stdin).
  19. Programs run this way have access to stdin via `io.stdin` in the global
  20. environment.
  21. -c <file>: After loading the program, write bytecode to the file, instead of
  22. running the program. Such files can be later loaded using the C option.
  23. -C: Assume that the program file is a compiled bytecode stream instead of Sol
  24. source text.
  25. Sol's exit status is determined by the following, in this order:
  26. - 0, on printing this help;
  27. - 2, if an argument, parsing, or initialization error occurred;
  28. - 0, if the file was to be compiled and was written successfully;
  29. - 1, if the program in the file encountered an error at the top level;
  30. - the integer value if an integer was returned at the top level;
  31. - 0 otherwise.
  32. For more information about the language itself, please refer to the source
  33. repository and/or `make docs` therein.
  34. Sol is Free Software under the Boost Software License, version 1.0; see LICENSE
  35. in the source repository for more details.