"TO DO" LIST FOR BUSH

TO POST

  - out and in out actual parameters can now be arrays
    - test out parameters with arrays

  - step documented but not in help page

SOONER

- ~/... + tab doesn't fill in
- 2>&1 doesn't work...2>, 2>>, >, >> work OK
- pipelines not allowed after 2>&1
- set input/output/error cannot be redirected to an file_type in an array
- undeclaring a variable but it still is affected by the type when accidently
  assigned to even though it doesn't exist
- missing double quote has line number 0...actually error during byte code
  compilation (A8=8)
- get_line doesn't strip ASCII.CR like I thought
- errors in `..` backquotes don't terminate script
- line2bytecode should read through Bourne shell words, not
  assume one set per line - doesn't allow comments on proc calls or
  O/S commands.
  - ke' at the command prompt throws a constraint error because of the
    improper Bourne shell handling
  - many of the bad tests have been broken by this

- files.last_modified( p ) - test & neg test
- line numbers and procedures: if an error occurs, the line number is not
  the line number of the procedure but where the procedure was called plus
  the offset into the procedure

- ? should trim strings?
- in morph.bush example, a single newline is output when Ada is shutting down.
  Is something flushed or what??...BUT a short sample script doesn't have this
  behaviour.
- in poetry.bush, reports line (variable) is a function though line is
  local scope variable

- @ works with procedures (but not with shell commands yet): the shell
  command identifiers might be a path "/bin/ls" or if command is an
  identifier($command if) will it still work?
  - should be its own identifier...maybe comma, too, to simplify code
  - document
- files package - (tests & neg tests)
  - should it handle ~?
  - doc and test files.last_modified
  - should restricted shell affect?
- p := numerics.rnd( n ), n := numerics.serial - document
  - (numerics.random * n mod n) + 1
- new string functions: neg tests
- for loops no longer confused by older vars of same name - neg test

- a range could be a new class.  That would allow arrays.range and a general
  parseRange
- for can benefit from ParseOptionalVariable just like Open( f ) except
  pragma ada_95 shouldn't cause for to error
- strings.replace_match/glob
- strings.cvs - comma separated values - 2, 3, "hello", ... fields
- control-c doesn't repond in loops? (e.g. example scripts)
- command_line.arguement() cannot be used in open...get an error.  Expects a
  type not a keyword...why?
- TERM exported the first time a command is called, but stty reports that
  TERM was not exported (isn't this a tput message?  There was a list of them
  indicating that BUSH was trying to reload terminal settings).  The second time
  stty is called, there is no error (TERM is available).  This only occurs when
  TERM is used in .bush_profile
- already declared error on enumerateds don't undeclare the previous
  enumerateds already declared
- i : integer := i raises an exception instead of "ident not declared"
  Also test with arrays.  BUSH ParseIdentifier should look for a previously
  declared i before doing typo check.
- arrays of arrays should have error message
- Wavplay doesn't recover gracefully from errors...need to reset defaults
  especially after an error
- unconstrained arrays and forced initialization
- ./bush -x didn't work for interactive, works for scripts
- pathname completion "/" and " " append tests should use stat(), not
  Text_IO and GNAT Dir Ops.  Perhaps another c_os function??
- insert sometimes inserts characters wrong in the command line.  Backing up,
  deleting and retyping is OK, but cursoring over and changing sometimes
  doesn't keep line position properly.
- pipe not allowed with built-in commands like "help".  This is part of a
  larger problem: >, >>, globbing, Ada params, etc.  Built-in commands
  should be declared in ParseShellCommand not ParseGeneralStatement.
- output numbers with alternative bases
- command vars should be &-able with backquotes.
- CGI package tests / documentation
  - CGI.key_value should be folded in with value, to be accurate
  - CGI should use GNAT CGI instead of third party AdaCGI package
- Text_IO stuff should be lumped under "Text_IO" in help.  Remove from
  "command reference" in docs
- Allow standard output, etc. to be closed.  (We dup them anyway.)
-   Move all Do procedures to parser_aux
-   Does scanner reset cause Current_Output/etc. to be double dup()'ed
- TCP/IP client sockets
  - "file /= eof_t" is wrong: standard_input could be specified explicitly
  - linux socket calls in bush_linux
  - set_output, etc. redirection
  - optimize fd - don't need to pull it out with stringField for every DoGet
- ~ in completions (user_io has no knowledge of the home directory)
- test suite test for var existence after declare block end, array & itself,
  array casts, array subtypes, array default assignments, cmdline redirect &
  restricted shells, -e, in / not in operator, unchecked_import tests in test
  suite
- sound.mute, sound.unmute (mixer not covered fully in BOBLAP #16.17.3)
- to_julian / to_time not working

Regression Tests Needed
  - to_upper, to_lower, to_proper, to_basic, to_escaped
  - numerics.odd, numerics.even


LATER

- changes to allow for "i : integer := i" not tested for arrays...that is,
  values being assigned to arrays probably can't contain the same name as
  the array.  See ParseDeclarationPart for how to handle this.
- would arrays be faster as real dynamic ada arrays?
- initial values to an array: the way BUSH is written, ParseAssignPart
  returns a value to be assigned to possibly multiple variables in a
  declaration.  A list of array values or an array reference cannot be
  returned.  Should pass a declaration param NOT a expr/kind pair.
- string should be an array type, but they are not arrays in the bush sense
- if prompt_script was a variable, not a pragma, it could be exported between
  nexted shell sessions
- command line redirection tests in testsuite
- BUSH hangs with vt52 40x8 login, throws exception (perhaps division by
  zero because attributes like bold null strings??)  Also has ctrl-q's
  so maybe a flow of control problem
- a pragma inline should be created in order to cache other scripts
- support for foreign characters (ie ASCII 128 and greater)
- naturals and positives compatibility (intTypesOK) not handled at
  assignment
- ideally, unbounded_strings should not be a subtype of universal strings
  for compatibility with Ada 95.  As a result, an unbounded_string typecast
  shouldn't work but it does in AdaScript.
- need to allow "" in string literals (for prompt string)
- return doesn't exit properly using exit_block/setting token to eof...but
  I may have fixed this.  Nothing shows up on the regression tests.
- SIGSUSP (control-z) handler, fg, bg not implemented
- SIGHUP handler: SIGHUP should be broadcast to all children like BASH
- review parser/child package structure
- an exactly 80 column line doesn't redraw right in the command history
- DoRunTimeStatments should probably fork and use pipes to read results
  instead of using a temp file
  - otherwise, DoRunTimeStatements only read results one char at a time
- remove dependency on Ada.Command_Line.Environment -- not supported in Windows GNAT
- tests for large numbers of open/close to make sure we don't run out
  file descriptors because of improper closures
- lineRead still reads as unbounded_string instead of copying directly
  into script variable, causing double buffering and conversion slowdowns
- close with no filename should close all open user files (ala BASIC)
- an error terminates all commands in an interactive semi-colon
  list, but it should continue on
- default exported identifiers (HOME, PATH, etc.) ?
- job control
  - check sig child flag after every general statement (already done?)
  - signal handling (after each command)
    - suspend command on control-z
  - single user mode detection, disabling job control
- because terminal attributes are toggled on and off, slow systems sometimes
  echo characters during input, throwing off the display
- pragma to disable emacs or vi mode
- no declarations between begin..end
- enumerateds should be upper-case, if this doesn't conflict with type-
  sensitivity
- collating order with file globbing and locales
- new data structures
  - bag, set and collections?
  - un/bounded_string types
- functions
  - parameter matching 
  - scanning from an unbounded_string
- packages
  - Ada.Calendar time math not implemented (nor getting the day)
  - texttools package?
  - complex number functions under numerics package?
  - stats package
  - TCL/TK package
  - Julian time
- package changes
  - strings.fglob function
  - attribute handling, if easy to implement
  - test strings.match in Gnat 3.14
  - line count for a file doesn't work if put_line doesn't include the file variable
    or if it's a built-in file (standard_output, current_output, etc.)
  - Ada command_line functions (use full name)
- "not in" operator (requires look ahead)
  - System_Name should be enumerated
- language changes
  - scientific notation numeric literals
  - exit error if not an for or while (requires pulling the block and check for
    the symbol which started it).  Perhaps storing the token that starts the block
    for_t, etc., in block structure.
  - better parameter handling when "bush script.bush" is run (ie. shift the
    identifiers to the left)
  - use clause and storage in block list for it
- performance
  - more sophisticated byte code for speed
     - this will require the scanner and parser holding two different tables for
       identifiers (because only the parser knowns what block(s) an identifier
       belongs to).  Otherwise, the existing get_next_token can be used to
       tokenize the script file.
  - change system calls to get tput results - remove system() reliance
  - "kind" field should be a pointer for speed, not an array index
  - no type-checking after syntax-check stage
  - command caching
  - embed line numbers instead of counting them as the script runs
- while i < 2 loop
    if i = 0 then
       j : integer;
    end if;
  end loop;
  doesn't work since declarations are always done even if skipped because
  the symbols need to be in the symbol table when walking through the
  syntax even when the statements aren't being executed.  This is a rare
  case, but it also raises the issue of scope with pullBlock--technically,
  j is a global but pullBlock treats all internal declarations as local.
- overloadable enumerateds
- multidimensional arrays
- initialization message appears but it locks up Tandy 102 (terminal emulation
  didn't have a chance to change in .bush_profile script)

