Commit Graph

4 Commits

Author SHA1 Message Date
Kelvin Sherlock ce1a36eba5 add regular expression support for evaluate, if, etc.
eg:

evaluate abc =~ /(abc)®4/ # sets the '@4' environment variable.
evaluate abc !~ /[aA]bc/

MPW regular expressions are converted to c++11 std::regex regular expressions and evaluated.
Sadly, the // regular expression syntax interferes with unix-paths (if the / count is odd).  quoting or ∂-escaping the /s is therefore necessary.

file globbing is not yet implemented.
2022-11-22 17:22:49 -05:00
Kelvin Sherlock 33dd3228f8 update the parser/lexer to make it more reusable. For example, subshells are now handled. 2016-08-16 16:47:20 -04:00
Kelvin Sherlock b9782a0926 phase 1 -- escape nl in comment joins the line. 2016-07-28 15:26:37 -04:00
Kelvin Sherlock fed90b3753 rewrite phase1 in C -- slightly strange processing is ugly in ragel.
Also move error checking for strings/variables until later.
2016-07-21 11:46:39 -04:00