KLL Compiler
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

syntax.bash 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/bash
  2. # Use example .kll files to check syntax compatibility
  3. # Does not generate code, so resulting datastructures do not necessarily need to functino
  4. # Jacob Alexander 2016
  5. SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  6. # Common functions
  7. source ${SCRIPT_DIR}/common.bash
  8. # Start in kll top-level directory
  9. cd ${SCRIPT_DIR}/..
  10. # Args used for each of the tests
  11. ARGS="--emitter none --data-finalization-display"
  12. FAIL_ARGS="--emitter none --token-debug --parser-token-debug --operation-organization-display --data-organization-display --data-finalization-display"
  13. # Files to check syntax on
  14. FILES=(
  15. examples/assignment.kll
  16. examples/capabilitiesExample.kll
  17. examples/colemak.kll
  18. examples/defaultMapExample.kll
  19. examples/example.kll
  20. examples/hhkbpro2.kll
  21. examples/leds.kll
  22. examples/mapping.kll
  23. examples/md1Map.kll
  24. examples/simple1.kll
  25. examples/simple2.kll
  26. examples/simpleExample.kll
  27. examples/state_scheduling.kll
  28. )
  29. ## Tests
  30. cmds "./kll" "${ARGS}" "${FAIL_ARGS}" ${FILES[@]}
  31. ## Tests complete
  32. result
  33. exit $?