Commits on Feb 22, 2015
  1. Merge pull request #30 from ryanpcmcquen/patch-1

    Remove trailing slash from INSTALL_PREFIX
    committed Feb 22, 2015
Commits on Feb 21, 2015
  1. Remove trailing slash from INSTALL_PREFIX

    Otherwise '//' occurs.
    Ryan P.C. McQuen committed Feb 21, 2015
Commits on Oct 15, 2014
  1. Merge pull request #29 from tekknolagi/master

    no need for gotos...
    committed Oct 15, 2014
Commits on Aug 1, 2014
  1. @tekknolagi

    no need for gotos...

    tekknolagi committed Aug 1, 2014
Commits on Jun 8, 2014
  1. Changed default CC to Clang

    Modified source to allow for compiling with both GCC and Clang
    committed Jun 8, 2014
  2. Added item to TODO

    committed Jun 8, 2014
Commits on Mar 24, 2014
Commits on Jan 19, 2014
  1. @bl0ckeduser

    Merge pull request #28 from PaytonTurnage/master

    Modify htab to have generic function names, and find to be nonredundant.
    bl0ckeduser committed Jan 19, 2014
Commits on Jan 15, 2014
  1. @turnage

    Fix bug where an outdate node is returned.

    If htab_add_core added a node that happened to push the htab past its load
    factor, it would return a pointer to where the added node was *before* the
    rehash. Now it does not do this.
    turnage committed Jan 15, 2014
  2. @turnage
  3. @turnage

    Rename htab functions; rewrite find to be generic.

    The htab functions find_str and add_str have been renamed to include _ref in
    the places they previously noted _str. These are intended to manage an htab
    containing references to any data; string or not.
    The htab_find function has been divided up. htab_find_core now handles actually
    finding the correct node. htab_find and htab_find_ref are just outward facing
    functions for retrieving a specific kind of data from the node, depending on
    what the htab is used for.
    turnage committed Jan 15, 2014
Commits on Jan 14, 2014
  1. Merge pull request #27 from PaytonTurnage/master

    Implementation for Preprocessor Defines
    committed Jan 14, 2014
  2. @turnage

    Remove assumption that node is in the bottom of the bucket.

    This is the last remaining instance of this assumption.
    turnage committed Jan 14, 2014
Commits on Jan 13, 2014
  1. @turnage

    Do not write a value for strings in htab.

    The assignment is unnecessary, and was overwriting the first element in the bucket (not the added string's value) in the case of a collision.
    turnage committed Jan 13, 2014
  2. @turnage

    Add a new function to return strings from htab.

    The htab_find_str function eliminates the assumption that the string
    is in the first place in the bucket.
    turnage committed Jan 13, 2014
  3. @turnage
  4. @turnage

    Add preprocessor directives to the SYNTAX file.

    The preprocessor section of the SYNTAX file has been rewritten to match
    the other sections in style, and include both %include and %define
    directives. #27
    turnage committed Jan 13, 2014
  5. @turnage

    Implement defines using the htab structure.

    The htab_structure has been modified in two ways, which should not break
    compatability with any of its uses.
    It includes a void pointer, which is in this commit used to point to a
    string for defines, and will in the future be used to point to the address
    space for words, bytes, and double words.
    It now includes a function htab_add_str specifically for storing strings.
    It calls htab_add so as not to be redundant, but makes the node's value
    their index for the lexer to fetch using htab_find, and assigns their
    void pointer.
    The lexer will now use htab_find on all tokens to see if they are a define
    string, and if so, substitute them with the appropriate token.
    The defines htab is destroyed after lexing, because that memory is done.
    turnage committed Jan 13, 2014
  6. @turnage

    Remove all traces of the tvm_tree structure.

    It is to be replaced with a htab hash table.
    turnage committed Jan 13, 2014
  7. @turnage

    Allow the preprocessor to abort.

    If the preprocessor encounters a problem, such as failing to load a source
    file or an improperly formatted define, it should be able to abort running
    the program.
    turnage committed Jan 13, 2014
  8. @turnage

    Warn on redefining.

    turnage committed Jan 13, 2014
  9. @turnage

    Free the defines memory earlier.

    There is no need to keep this memory for the life of the program.
    turnage committed Jan 13, 2014
  10. @turnage

    Substitute defines with their strings.

    Before allocating space for a token, the lexer will first check to see
    if that token is a defined name. If it is, it will allocate space for
    the defined string instead.
    A test file is included in programs/tinyvm/preprocessor to demonstrate
    the behavior. When functioning, the program will print the fibonacci
    turnage committed Jan 13, 2014
  11. @turnage

    Implement preprocessor defines.

    This commit adds behavior to the preprocessor which fills a tree with
    defines and their replacements. In future commits, the parser will
    substitute instances of the defines with their replacements in the
    source code.
    turnage committed Jan 13, 2014
  12. @turnage

    Fix naming conflict.

    turnage committed Jan 13, 2014
  13. @turnage

    Enable keeping track of associated values.

    The tvm_tree structure should optionally be able to keep track of values
    associated with the strings by which its nodes are sorted. In the case of
    defines, this is the replacement string. In the case of variables, this
    will be a pointer to the variable's location in memory.
    Searching should return the value, or NULL.
    To opt out of storing a value, pass NULL and 0 as the val and len arguments.
    turnage committed Jan 13, 2014
  14. @turnage

    Add a structure for searching strings.

    The tvm_tree structure is a binary search tree. It will be used to hold
    preprocessor defines, and variable names for when defining bytes, words,
    and double words is implemented.
    Each node structure and its own string are stored contiguously (in that
    order) so the free's are easier to keep track of, and memory doesn't need to
    be a concern when adding a string to the tree.
    turnage committed Jan 13, 2014
Commits on Jan 11, 2014
  1. Modified TODO

    committed Jan 11, 2014
  2. Added TODO

    committed Jan 11, 2014
Commits on Aug 12, 2013
  1. @bl0ckeduser

    Simplify a structure copy

    bl0ckeduser committed Aug 12, 2013
  2. @bl0ckeduser

    Fix incorrect truncation of floating-point data

    If the entire parenthesized division expression is cast to float, as it
    was prior to this commit, C performs truncating integer division before
    converting to float, which always leads to a result of zero.  `git-blame'
    traces the bug to commit d5ed7e7, which
    added the faulty parentheses as a matter of style. No parentheses are
    necessary, since increments have higher precedence than type-casts,
    type-casts have higher precedence than division, and division has
    higher precedence than comparison. The operations will execute in the
    desired order.
    bl0ckeduser committed Aug 12, 2013
Commits on Mar 14, 2013
Commits on Mar 7, 2013
  1. Fixed filename typo

    committed Mar 7, 2013