1. 09 Mar, 2019 1 commit
    • Samuel Newbold's avatar
      Semicolon divides statements outside of argfunctions · f692d832
      Samuel Newbold authored
       *  Separate errors for unclosed_brace and unclosed_parenthesis
       *  .source uses the – [argv ...] prototype
       *  command lines are no longer used as arguments to interpret
          themselves. This was a cute feature that got used several
          times in the test suite, and never anywhere else.
  2. 06 Feb, 2019 1 commit
    • Samuel Newbold's avatar
      Builtins have prototypes-> s/.bad_argc/.bad_args/g · eebd9138
      Samuel Newbold authored
      * Improved error handling while deleting 17% of builtin.cc and removing
        three quarters of the C++ throw statements.
      * (A +- B) != A iff B != 0 and (A */ B) != A iff A != 0 and B != 1
        otherwise an .epsilon exception is thrown
      * Also, added .var_multiply and * function
      * A first version of a validating ln function
  3. 16 Jan, 2019 1 commit
    • Samuel Newbold's avatar
      Argfunctions are part of prototypes · 7308a143
      Samuel Newbold authored
       * give an error for the currently unsupported fixed arguments
         (not useful until you can use them to distinguish multi-bodied
         functions and .scopes)
       * handle errors in prototype instantiation in parallel so I don't
         lose functionality in the next step.
  4. 10 Jan, 2019 2 commits
    • Samuel Newbold's avatar
      Statements print output and return control flow · ec8c0cb0
      Samuel Newbold authored
      * Removed .return
      * Replaced fixed $? handling with something configurable and more useful
      * executables have void prototypes
      * fixed a bunch of out-of-date or simply incorrect comments
    • Samuel Newbold's avatar
      a thrown exception triggers .failed_substitution · da07be75
      Samuel Newbold authored
      * fixing a recently introduced bug where the statement that contained a failed
        substitution would still run.
      * the intentionally broken .failed_substitution handler is tested only where
      * test and false functions wrap /usr/bin/test and /bin/false, and throw .false
        exceptions for their return codes so that they can be used for control flow.
      * replacing the excessively precise but deprecated usleep() with the even more
        excessively precise nanosleep.
      * .store_output identifies error by a thrown exception rather than a return
      * .fork returns exit_code rather than dollar_question
      * removing several more -1 returns.
  5. 04 Jan, 2019 1 commit
    • Samuel Newbold's avatar
      if and else must be in same block · c843b411
      Samuel Newbold authored
      Also, exit handled as an exception and includes the return value for the
      shell, exceptions don't need to return -1, zero returns are not printed
      in the test suite, static members of executable moved to new call_stack
  6. 14 Dec, 2018 1 commit
  7. 16 Nov, 2018 1 commit
  8. 14 Nov, 2018 1 commit
  9. 05 Nov, 2018 1 commit
  10. 31 Oct, 2018 1 commit
    • Samuel Newbold's avatar
      Prototype almost all functions, deprecate non-prototype · eb2042c2
      Samuel Newbold authored
         * FIGNORE ignore patterns now start to exempt more-specific requested
           patterns: for example, if a .* is an ignore pattern @.* will still
           return all files beginning with a period. If *~ is an ignore pattern,
           then @*c~ will return all files ending with c~, but if *c~ is an ignore
           pattern, then @*~ will return all files ending with ~ that don't end
           with c~.
         * .binary is necessary to add binaries to the executable map/hash table
         * .error to write to stderror
         * .rm_executable to remove something from the hash table rather than
           defining a function without a body
         * .test_in like the "in" test in awk
         * .which_path has special handling for ./ and ../ at the beginning of the
           executable name
         * Polish Arithmetic, including a - function for subtraction and a
           / function for division
         * Numerical variables (while they last) don't ignore trailing
           non-numerical characters (e.g. $1a is different from $1)
         * More exceptions can be thrown in parallel
         * And, of course, it isn't a significant commit if there isn't a tweak
           to the internals of if-else handling. This time it was handling
           if-else calls within the condition, (specifically in an autofunction
           implicitly called by a condition).
  11. 31 Jul, 2018 1 commit
    • Samuel Newbold's avatar
      Raise exceptions in .cd .which_path .function .exec .ls · c776e510
      Samuel Newbold authored
      Function not found - if the meaning of “Executable not found” is confusing to
      me, there's no reason why anybody else should understand it:
      Oh, and stop printing trailing whitespace in exception handlers
  12. 27 Jul, 2018 1 commit
  13. 21 Jul, 2018 1 commit
  14. 03 Jul, 2018 1 commit
  15. 28 Jun, 2018 1 commit
  16. 31 Dec, 2017 1 commit
  17. 21 Dec, 2016 1 commit
  18. 14 May, 2016 1 commit
  19. 24 Mar, 2016 1 commit
  20. 17 Mar, 2016 1 commit
  21. 29 Feb, 2016 1 commit
  22. 31 Oct, 2015 1 commit
  23. 27 Sep, 2015 1 commit
  24. 23 Sep, 2015 1 commit
  25. 20 Jul, 2015 1 commit
    • Samuel Newbold's avatar
      improvements to prototype parsing tests · 3d72a067
      Samuel Newbold authored
      * Adds rwsh.dash_dash_argument exception and calls it when [-- arg] (or
        something similar) occurs in a prototype
      * Adds checking for duplicate parameters in parameter groups. Adds support for
        parsing positional parameter groups in prototypes, though there is no support
        yet for this in function call handling.
      * Exception is now thrown when selection_read returns no results. Previously,
        rwsh.selection_not_found was run and then the function continued.
      * All of which was in response to reorganizing the tests for parsing of
        prototypes passed to .function_all_flags and .function_some_flags
  26. 14 Jul, 2015 1 commit
    • Samuel Newbold's avatar
      substitutions use Command_block rather than Function · 40643d10
      Samuel Newbold authored
      this was done to enable .list_locals to effectively test option parsing, and the
      option parsing was revised to make use of it. The supporting changes included:
      * Executable was divided into Base_executable and Named_executable
      * std::vector<Arg_script> was separated out as a Command_block which is itself
        a Base_executable.
      * promote_soons() is a modifying function rather than one that always constructs
        a replacement
  27. 02 Jul, 2015 1 commit
    • Samuel Newbold's avatar
      arguments to flag options and .list_locals · 5e8270e0
      Samuel Newbold authored
      * support for arguments to flag options (though I want to test this more
      * initial support for list_locals, which is of limited use because
        substitutions run as a function call with their own (empty) set of locals
      * updating documentation to what the shell will be after the next few things
        that i will be fixing
      * pulling out the repeated pattern of local_or_append_word and
        set_or_append_word, and some related variable_map refactoring
  28. 18 Jun, 2015 1 commit
    • Samuel Newbold's avatar
      Duplicate_parameter, Mismatched_bracket, Unrecognized_flag, --, and some documentation · 1fa64325
      Samuel Newbold authored
      * The new exceptions Duplicate_parameter, Mismatched_bracket, and
        Unrecognized_flag were created, though Mismatched_bracket has only the
        beginnings of an implementation.
      * [--] is implicit in function definitions, and a single -- terminates the
        search for flag options, setting $-- in the process.
      * There are some documentation updates that are unrelated to the current
        changes, as well as documentation of them, and some documentation of option
        handling thus far.
  29. 01 Jun, 2015 1 commit
    • Samuel Newbold's avatar
      flag options support (bad_argc exception includes optional arguments found) · 378747e8
      Samuel Newbold authored
      * flag_options and required replace parameters.
      * Function copy constructor added because the iterator constructor now parses
        required from optional flag arguments.
      * flag options are identified instantiating those variables if they don't exist
        and appending to them if they do.
      * Function's Bad_argc error separately identifies the number of required and
        optional arguments that had been found
      * Argm::Argument_count was renamed Argm::Bad_argc. Honestly this was because
        the lines it was in were already too long and needed an additional argument,
        but it was such a common incantation that I wanted it to fit on a single line.
  30. 24 May, 2015 1 commit
    • Samuel Newbold's avatar
      local variables and checked function prototypes · 0094889f
      Samuel Newbold authored
      * each Argm is constructed with an explicit Variable_map (which requires a
        method to extract said Variable_map for constructing child Argm's)
      * Variable_maps have a number of changes to support the distinction between
        local and global variables, in particular, most operations recurse through
        parent_maps rather than being local only. export_env() is the exception, since
        this is non-trivial to implement and not necessary for the current use-case.
      * each function invocation is given a new variable map for its local variables
      * checked function prototypes - local variables matching the parameter names are
        filled in on invocation, and execution fails with an rwsh.argument_count
        exception if there are too many or too few arguments for a function.
      * dollar_question fixes: inexplicably i need to explicitly use get() when there
        is more than one Variable_map, but not when there isn't. as part of debugging
        this i replaced all of the indirect references as dollar_question to be
      * .local builtin, supported by Argm::local() and Variable_map::local()
      * .global fails with a new error code if the value would be masked by a local
      * finally a set of appropriate testing for .function_all_options (at least of
        its current functionality) and local variables
  31. 21 May, 2015 1 commit
    • Samuel Newbold's avatar
      removing Argm::push_front() and Argm::pop_front() · baf68f2b
      Samuel Newbold authored
      These functions would be a nuisance to implement for an Argm based upon a map
      rather than a vector. They were also generally the lazy way out when they were
      used, so their replacement is cleaner.
      * New Argm constructor takes initial argument and pair of iterators, which
        replaces the actual need for a push_front
      * Argm default constructor replaced by one that forces specification of streams
      * Many uses of Argm.push_back() replaced by Signal_argm constructors I already
      * Fixed a couple of copyright dates from earlier changes.
  32. 18 May, 2015 1 commit
    • Samuel Newbold's avatar
      Argv becomes Argm · cceda846
      Samuel Newbold authored
      I renamed almost all instances of argv to argm. The exceptions are:
       * isargvar() (it is short for "is argument variable")
       * int main(argc, argv), the compiler wouldn't complain, but the point is that
         Unix gives you all of your arguments as positional arguments, while within
         shell functions arguments will be named to the point that positional
         arguments will be named by the number of their position
       * Old_argv this is to convert internal argument maps to UNIX argv. Now that
         the internal object isn't called Argv, the "Old_" part is redundant, but
         this was confusing and involved enough of a change that I didn't want to
         tempt fate by making more changed code look like code needing change.
      This caused most of the copyright dates to change, most of them for the first
      time since 2007 or 2008.
      max_nesting_v became static, which doesn't change anything because there was
      only one instance of the class ever used.
      var_map became parent_map and stopped being static; i just explicitly
      initialize them to all be the same.
      ** Note that these Argm objects are still vectors. I wanted to change the name
         first and having done so there are so many changes in the working copy that
         I didn't want to do another complex change without a commit.
  33. 25 Sep, 2010 1 commit
  34. 19 Sep, 2010 1 commit
  35. 15 Sep, 2010 1 commit
  36. 14 Sep, 2010 1 commit
  37. 12 Sep, 2010 1 commit
  38. 08 Aug, 2010 2 commits