Commit Graph

198 Commits (06435f9f178fc17c094c03df544b897d6ff55c72)

Author SHA1 Message Date
Mike Gerwitz 06435f9f17 progtest: Add runner script
* .gitignore: Ignore new generated files (Autoconf, Automake, output).
* Makefile: Rename to `Makefile.am', dynamically expand
  `--harmony-destructuring'.
* autogen.sh: New script.
* bin/runner.in: New runner script.
* bin/runner.js: Resolve program path relative to CWD.
* configure.ac: New configure script.
2018-03-05 15:57:38 -05:00
Mike Gerwitz abca20b02d depgen: Include enum constants as typedef dependencies
This ensures that they are compiled into the `consts' object.

* src/current/include/depgen.xsl (preproc:depgen)[lv:typedef]: Include
  `lv:enum/lv:item/@name' as dependencies.
2018-02-28 15:29:49 -05:00
Mike Gerwitz b70cbb9eae standlone: Correct consts reference for worksheet
This was broken in 0c020b7.

* src/current/standalone.xsl (/): {rater_results=>rater}.consts.
2018-02-26 10:39:03 -05:00
Mike Gerwitz 5b256e0268 symtable: Do not mark symbols with generated yields as generated
The problem with this implementation was that, any time a generator had an
associated generated @yields (which is common), it wouldn't be included in
the summary page.

We can address this in the future.  It's not necessarily that it was
incorrect; it's just how the system made use of it.

* src/current/include/preproc/symtable.xsl (preproc:symtable)[lv:rate]:
  Do not mark @preproc:yields-generated symbols as @preproc:generated.
2018-02-26 10:31:04 -05:00
Mike Gerwitz d8cbee12b2 validtor: Remove unresolved extern warning
See diff comment.

* src/current/compiler/validate.xsl (lvv:validate)[c:*[@name or @of]]:
  Remove unresolved extern warning.
2018-02-26 10:30:42 -05:00
Mike Gerwitz 2f7ad95a2c TestRunner: Recognize error as failure 2018-02-23 15:45:54 -05:00
Mike Gerwitz 7475b5b928 progtest/README.md: Basic test case format documentation 2018-02-23 14:30:02 -05:00
Mike Gerwitz 6b7e75c886 entry-form: Integrate YAML test case console output as HTML 2018-02-23 14:20:16 -05:00
Mike Gerwitz 1a51259a76 HtmlConsoleOutput: Add HTML-styled console output 2018-02-23 14:20:10 -05:00
Mike Gerwitz 5aa29216f4 Makefile: run modindex first 2018-02-23 13:45:38 -05:00
Mike Gerwitz 3bf15ebcc1 depgen: Ignore template bodies
Templates can expand into unexpected places, so sometimes warnings are
inappropriately issued.

* src/current/include/depgen.xsl (preproc:depgen)[lv:template]: Ignore.
  [lv:template/lv:param]: Remove (now unnecessary with above).
2018-02-23 13:45:07 -05:00
Mike Gerwitz 6487282f55 progtest: add dist target 2018-02-23 12:28:03 -05:00
Mike Gerwitz b490d07371 Makefile.am: Prevent doc from being built by default 2018-02-23 12:24:14 -05:00
Mike Gerwitz d1aa5f5704 progtest/Makefile: Build tame-progtest.js as default target 2018-02-23 10:40:00 -05:00
Mike Gerwitz 76795d1c89 progtest/package.json (devDependencies): Add mocha and chai 2018-02-23 10:34:38 -05:00
Mike Gerwitz fcc5c087fd progtest/package.json: Correct browserify version 2018-02-23 10:31:51 -05:00
Mike Gerwitz 3384c95bc9 Revert "program map: Use expanded (preprocessed) program"
This map is used for more than the program.xml!

This reverts commit c64e8363fd.
2018-02-22 16:42:26 -05:00
Mike Gerwitz c64e8363fd program map: Use expanded (preprocessed) program
* src/current/compiler/map.xsl (lvmc:compile)[lvm:program-map]: Use
  `program.expanded', which is the preprocessed output.
2018-02-22 16:25:10 -05:00
Mike Gerwitz 79cc96e026 Merge branch 'progtest' 2018-02-19 15:21:16 -05:00
Mike Gerwitz 4b1a72db81 entry-form: Clear YAML filename after loading
This way the test case can be re-loaded; otherwise it is
not recognized as a change and does not trigger the event.
2018-02-19 15:21:14 -05:00
Mike Gerwitz a52cbcea41 Correct param initialization 2018-02-19 15:21:14 -05:00
Mike Gerwitz 9e421daf67 progtest: bug: constants are not initialized until rating
Ugh, this is nasty.
2018-02-19 15:21:14 -05:00
Mike Gerwitz b214945963 progtest: .gitignore: ignore compiled output 2018-02-19 15:21:14 -05:00
Mike Gerwitz 4e3a86866a progtest: Display reader errors in browser 2018-02-19 15:21:14 -05:00
Mike Gerwitz 0b433e86f4 progtest: Async run each test serially
If that makes sense.

The problem is that the browser needs to repaint after each test is
run.  See code comments.
2018-02-19 15:21:14 -05:00
Mike Gerwitz f788edd675 Initial embedding of YAML test case runner 2018-02-19 15:21:14 -05:00
Mike Gerwitz 253f845803 progtest: Generate index.js files 2018-02-19 15:21:14 -05:00
Mike Gerwitz 47f0f4039b progtest: Initial working console runner 2018-02-19 15:21:14 -05:00
Mike Gerwitz 0c020b736d Produce consts as part of rater object 2018-02-19 15:21:14 -05:00
Mike Gerwitz 7f26db41b2 Properly re-order classification predicates of any dimension
In order for the cmatch algorithm to work properly, predicates must be
re-ordered on @dim descending.

* src/current/compiler/js.xsl (compile)[lv:classify]: Order all different
  dimensions, not just scalars.
2018-02-19 13:56:08 -05:00
Mike Gerwitz 34b82e7f7e preproc: Fix lv:any-only conversion broken from last commit
Gah.

This system really needs tests.
2018-02-19 11:41:27 -05:00
Mike Gerwitz 1f545a11ff preproc: Expand templates in extracted classes
any/all blocks within classifications are extracted into their own
classifications.  When they have sibling nodes, the extracted
classifications did not have their templates expanded.  Ouch.
2018-02-19 11:30:49 -05:00
Mike Gerwitz f15a1bb063 Copyright update (R-T Specialty) 2018-02-01 13:11:52 -05:00
Mike Gerwitz 088a56c336 Add HACKING
* HACKING: New file.
* README.md: Copyright update.  Add mention of HACKING.
2018-02-01 13:08:03 -05:00
Mike Gerwitz cac38d5e06 lv:rate/@generates: Validation error (bugfix)
* src/current/compiler/validate.xsl (lvv:validate)[lv:rate[@generates]]:
  Throw validation error.
2018-02-01 13:08:03 -05:00
Mike Gerwitz c5fcc3ccd2 template: Add prefix and suffix conditional support (feature)
* src/current/include/preproc/template.xsl (preproc:apply-template-cmp): Add
  @prefix and @suffix.
2018-02-01 13:08:03 -05:00
Mike Gerwitz c0370690f4 validate: Error on nested rate blocks (bugfix)
* src/current/compiler/validate.xsl (lvv:validate)
    [lv:rate[ancestor::lv:rate]]: Error on nested rate block.
2018-02-01 13:08:03 -05:00
Mike Gerwitz 9c4fbdace9 symtable: Only consider first lv:rate ancestor for parent (bugfix)
This is a situation that should never happen (I haven't yet determined
whether or not we should support this type of thing in the future), but when
it does, do something intelligent.

* src/current/include/preproc/symtable.xsl (preproc:symtable)[c:*[@generates]]:
  Consider only first ancestor lv:rate.
2018-02-01 13:07:51 -05:00
Mike Gerwitz b36cc3a942 c:sum/@of: Support let values
It's not good that c:let is still doing its own logic for this.

* src/current/compiler/js-calc.xsl (compile-calc)[c:sum[@of]]: Support c:let
  values.
2018-01-30 12:10:11 -05:00
Mike Gerwitz f2a9cd6af8 calc.xsd: Allow ##other in consts
* src/current/calc.xsd (constType): Allow ##other
2018-01-29 16:30:56 -05:00
Mike Gerwitz 9747d16464 Permit matrix reference in c:length-of (bugfix)
* src/current/compiler/validate.xsl (lvv:validate)[c:value]: Allow direct
  matrix reference (without index) in `c:length-of'.
2018-01-29 13:14:02 -05:00
Mike Gerwitz 440b935dc0 Display error on non-scalar constant lv:match/@value (bugfix)
* src/current/compiler/js.xsl (compile)[lv:match]: Display error on bad
  match, as it was intended.
2018-01-29 13:14:02 -05:00
Mike Gerwitz 00ce03ab25 src/current/calc.xsd (nameType): Permit numeric literals (bugfix)
* src/current/calc.xsd (nameType): Permit numeric literals.

These have already been permitted, but the XSD disallowed.
They worked in templates.
2018-01-29 13:13:56 -05:00
Mike Gerwitz 854f87a60d template: Remove accidental debug output
* src/current/include/preproc/template.xsl (preproc:apply-template)[@*]:
  Remove debug output.
2018-01-25 15:39:20 -05:00
Mike Gerwitz d128b2384e entry-form: Ignore missing DOM elements
* src/current/scripts/entry-form.js (updateParamTestcaseDfn): Ignore if DOM
  element cannot be found.
2018-01-25 15:27:27 -05:00
Mike Gerwitz 78ea30e7b5 Retain unknown template param references during expansion
For example, with template-generating templates, if a reference is unknown
and therefore determined to be blank, an attribute might be completely
removed while the template is being generated.  (See the /when package in
core for an example.)  That is not good.

* src/current/include/preproc/template
  (preproc:expand-template): Add `tpl' tunneling param to
    preproc:apply-template application.
  (preproc:apply-template)[@*]: Retain param reference if applying template
    does not define it.
2018-01-25 14:53:31 -05:00
Mike Gerwitz 87a059f0c8 Retain template conditionals verbatim if param unknown
This is important for template-generating templates.

* src/current/include/preproc/template.xsl (lv:if,lv:unlesS):
  Retain conditional nodes verbatim when referenced param is unknown.
2018-01-18 15:44:12 -05:00
Mike Gerwitz 211387ce2f Mark generated @yields on classes and rate-each as such on symbols
* src/current/include/preproc/expand.xsl
  (lv:classify): Set `@preproc:yields-generated' if `@yields' was not
    previously defined.
* src/current/include/preproc/macros.xsl:
  (lv:rate-each): Set `@preproc:yields-generated` if `@yields' was not
    previously defined.
* src/current/include/preproc/symtable.xsl:
  (lv:rate, lv:classify): Set `@preproc:generated` on symbol if
    `@preproc:yields-generated'.
2018-01-16 12:12:33 -05:00
Mike Gerwitz f8dcdbfd23 make-full-graph: Add script
* build-aux/make-full-graph: Add script.
2018-01-16 11:56:06 -05:00
Mike Gerwitz f8d21c1c5f summary: Correct height of pipes denoting length
* src/current/include/calc-display.xsl
  (c:sum[@of], c:length-of): Add `\left', `\right'.
* src/current/summary.xsl: Update "N.B." section.
2018-01-11 08:42:04 -05:00