summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix bug where '[' would be lostv1.3.1Daniel Silverstone2017-02-126-11/+26
| | | | | | | | | If the accumulator was non-empty during the lexing of a lexeme which contained '[' such as ![foo] the ! being in the accumulator would prevent the [foo] being processed as a quoted sublexer. Since [] quoting is only for sublexing, instead we add the accumulator to the lexeme so that it can be used later in the compiler to ensure that ![foo] correctly turns into !__autodefN etc.
* Add CoCv1.3Daniel Silverstone2016-05-301-0/+20
|
* Merge branch 'subword-errors' of ↵Daniel Silverstone2015-11-308-90/+199
|\ | | | | | | git://git.gitano.org.uk/personal/richardmaw/lace
| * lace.error.render: Report all lines that caused errorRichard Maw2015-11-273-19/+58
| | | | | | | | | | This makes use of the line information added to the error traces, to report exactly which definitions also caused the problem.
| * lace.builtin.define: Record the definition in error wordsRichard Maw2015-11-272-0/+34
| | | | | | | | | | | | | | | | This wraps the defined function to record the line and word offset that the function was defined at. Because we abuse the define command to define subexpressions, we also have to undo that.
| * lace.error.render: Build wordset before filling in linesRichard Maw2015-11-271-9/+11
| | | | | | | | | | This is entirely cosmetic to make subsequent diffs, that make it return lines for defines as well, more readable.
| * lace.builtin: Augment returned errors with line numbersRichard Maw2015-11-271-4/+15
| |
| * lace.builtin: Pass the rule into builtin functionsRichard Maw2015-11-273-42/+50
| | | | | | | | | | | | | | | | | | This added the rule parameter after the exec_context parameter, by extending the arguments list, rather than changing the engine to pass the rule back into its callback, so that user-defined rules aren't broken by getting an unexpected parameter. Unfortunately this required renumbering all the unit tests' indexes.
| * lace.builtin: Augment default rule with source and line numberRichard Maw2015-11-271-2/+7
| |
| * lace.error: Move augmented source location into wordsRichard Maw2015-11-272-6/+6
| | | | | | | | | | The intention is to make `words` record which source line the words were in, so it's no longer implicitly the line being interpreted.
| * lace.builtin.include: Record subwords for include errorsRichard Maw2015-11-271-0/+3
| | | | | | | | | | | | This adds the file path as the error word in include statements, so if an error happens in a file that has been included, the include statement is included in the chain.
| * lace.error: Split out subword collection logicRichard Maw2015-11-272-6/+11
| |
| * lace.builtin.include: Highlight the right word when inclusion conditional errorsRichard Maw2015-11-271-1/+2
| |
| * lace.compiler.transfer_args: call errors `msg`Richard Maw2015-11-271-4/+4
| | | | | | | | | | This avoids shadowing the error module, so its methods can be used.
| * lace.builtin.define: Clarify unknown control type errorRichard Maw2015-11-273-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | There was much confusion when trying to work out why define foo [bar] did not work. The fact that [bar] expands to `define $RANDOM bar` and the [bar] token is replaced by $RANDOM, which isn't a control type and is not defined until runtime, so can't work. Pragmatically this only prevents you using define to create an alias for another command, which is of debatable utility.
| * lace.builtin: move any/allof function outRichard Maw2015-11-261-9/+11
| | | | | | | | | | | | | | | | This is mostly for symmetry with the rest of the code, which has a separate _do_foo() most of the time. There may be minor performance improvements from not making closures as well, but that wasn't the purpose.
* | Merge branch 'subword-errors' of ↵v1.2Daniel Silverstone2015-11-244-19/+73
|\ \ | |/ | | | | git://git.gitano.org.uk/personal/richardmaw/lace
| * lace.error.render: Highlight the subword the error came fromRichard Maw2015-11-242-14/+37
| |
| * lace: Collect subwords when collecting errorsRichard Maw2015-11-242-4/+23
| |
| * lace.lex: Don't include trailing ] in subwordRichard Maw2015-11-241-0/+4
| | | | | | | | | | | | | | | | | | The trailing ] terminates the word, but is not part of it, so it should not be included in the word's span. It's simpler to fall through the termination with a modified current position than consume the word again.
| * lace.builtin: Offset anyof/allof error messagesRichard Maw2015-11-241-1/+9
|/
* Convert subdefines from {} to []Richard Maw2015-11-179-12/+12
| | | | | | | Gitano uses ${user} to let you define rules about the current user. Rather than significantly complicate the parser, it's easier to change the token.
* Allow sub sub definesDaniel Silverstone2015-11-106-21/+58
|
* Support sub-definition using bracesDaniel Silverstone2015-11-096-2/+67
|
* Add support for lexing {}d stringsDaniel Silverstone2015-11-092-6/+39
|
* Support the concent that compile_one_line() might return many rules for that ↵Daniel Silverstone2015-11-091-7/+14
| | | | one line
* Support lexing in a way which copes with terminatorsDaniel Silverstone2015-11-091-5/+9
|
* Add some unpack holding so that Lua 5.3 worksv1.1Daniel Silverstone2015-11-053-0/+6
|
* Fix small bug which fails to propagate defaultsDaniel Silverstone2015-11-054-3/+11
|
* Make luacov optional in the test suiteDaniel Silverstone2015-07-046-6/+6
|
* Change config.ld to talk about READMEDaniel Silverstone2015-07-031-1/+1
|
* Indent code sample in READMEDaniel Silverstone2015-07-031-9/+9
|
* Cache full lexes of rulesetsDaniel Silverstone2014-03-221-0/+8
|
* Attempt caching of lexed lines to speed things upDaniel Silverstone2014-03-221-1/+10
|
* More documentationDaniel Silverstone2013-12-093-2/+63
|
* Move ldoc generation into top levelDaniel Silverstone2013-11-2813-3/+8
|
* Lots of ldocDaniel Silverstone2013-11-267-4/+221
|
* PREFIX, not INST_ROOT, pleaseDaniel Silverstone2013-04-141-1/+3
|
* Move luacov out to a submoduleDaniel Silverstone2012-09-0913-986/+3
|
* LACE: Update version to 1.0 ready for taggingv1.0Daniel Silverstone2012-07-181-1/+1
|
* DOC: Update documentation, closer to 1.0 releaseDaniel Silverstone2012-07-1813-248/+346
|
* Add an ABI marker to lace.luaDaniel Silverstone2012-07-181-0/+3
|
* EXAMPLE: Simple example of using laceDaniel Silverstone2012-07-183-0/+249
|
* COMPILER: Remove unused local functionDaniel Silverstone2012-07-181-5/+0
|
* LACE: Ensure engine errors are propagated properly at runtimeDaniel Silverstone2012-07-178-8/+63
|
* LACE: More rendered error tests for all the builtinsDaniel Silverstone2012-07-176-2/+56
|
* TEST: Ensure builtin define rules seem to render errors properlyDaniel Silverstone2012-07-176-27/+69
|
* TEST: Simplify the rendered error tests in the compiler suiteDaniel Silverstone2012-07-171-36/+0
|
* TEST: More error normalisation testsDaniel Silverstone2012-07-179-5/+152
|
* LACE: Ensure errors are rendered properly and exposed during compilationDaniel Silverstone2012-07-175-5/+74
|