summaryrefslogtreecommitdiff
path: root/src/colm.lm
Commit message (Collapse)AuthorAgeFilesLines
* replced bare send syntax whith << and <- formsAdrian Thurston2020-07-181-1/+6
| | | | | | Elimintates associated ambiguity between extending statements and starting a new one. Bare send was a nice idea, but it is too much for the language to bear.
* first cut of a redefine statementAdrian Thurston2020-04-121-14/+24
| | | | | | | | Redefine happens during declaration. The existing langEl is removed from the map and a newly-declared lel replaces it. If the new list of productions references [...] the productions from the previous lel are moved into the new one, in its place. A copy would be preferrable, as move may require some fixup, but move gives an initial functional implementation. refs #112
* moved source files into commit repositoryAdrian Thurston2020-03-141-0/+910
|
* moved the original colm src dir to /colmAdrian Thurston2019-09-081-892/+0
|
* pushing the trim decision to run-timeAdrian Thurston2019-05-241-7/+4
| | | | | | | | | The trim and no-trim operators are both now in the expression. In places where we want the print mechanism to decide if it trims or not, we lift the trim operator out of the expression and into the send expression, then pass it to the print and send instructions. This way the stream or input (parser) can control the trim (auto_trim feature) with the expression overriding the default.
* allow referencing a tree in reduction actionsAdrian Thurston2018-12-171-0/+4
| | | | syntax is $*N
* removed XML and postfix print, implemented remaining print with sendAdrian Thurston2018-05-071-7/+1
| | | | | | | | Removed the XML and postfix print forms. The functionality is now achieved with xml(), xmlac() and postfix() functions. Now implementing the print and prints using the send expression. All printing is now handled via the send instructions.
* replacing the void LEL with a keyword and TYPE_VOID (non-tree)Adrian Thurston2018-05-041-0/+2
| | | | | Using LEL was a hack to make it work quickly, usig a non-tree type is the proper solution.
* removed string concatenation from pattern, constructor and stringAdrian Thurston2018-03-301-6/+3
| | | | | Only the send accumulator supports string concatenation. Taking this approach avoids ambiguity between a concatenation and a bare send.
* allow a prod-name case clause to also have a patternAdrian Thurston2018-03-111-0/+1
|
* added a send statement without the send <id>Adrian Thurston2018-03-101-13/+17
| | | | | | | | Added a bare send statement. This statement assumes availibility of send target named 'Output' Removed the expression statment to avoid ambiguity with factor string. Requires copying some factor items to the statment.
* allow switching on production numbersAdrian Thurston2018-03-091-1/+2
| | | | | Added a form to case statements that accepts a production name instead of a pattern.
* added a read_reduce statement to call postfix reducerAdrian Thurston2017-07-271-0/+2
| | | | Triggers the generation of the reducer. Accepts a stream.
* started on a tree print in postfix notationAdrian Thurston2017-07-201-0/+2
| | | | | Postfix notation can be used as a streaming tree format as both an output and input.
* some name improvements in colm grammarAdrian Thurston2016-10-011-14/+14
|
* auto-trim in print, send and construct, disable with @Adrian Thurston2016-10-011-3/+8
| | | | | | | | | | | | | | Now automatically trimming when building trees and printing. This is consistent with the $ operator. Rationale is to standardize on the most commonly desired behaviour and provide options for the less-needed. Also much less likely to result in surprising output. There are many cases where test inputs won't have any surrounding ignores, making it easy to forget a trim is required. Then the occasional tree with surrounding ignores will give an undesired result. Better to standardize on trim, making the default behaviour more consistent. The trim can be turned off with the @ operator in front of an expression.
* added the $$ operator, which converts tree-to-str with attrsAdrian Thurston2015-12-151-0/+1
|
* split reducers into their own classAdrian Thurston2015-11-051-1/+1
| | | | Previously selected with a runtime int. Using reduction name as the class name.
* allow access to rhs elements by numberAdrian Thurston2015-11-011-0/+5
|
* reduction actions: add loc reference, elim duplicate labelsAdrian Thurston2015-10-081-2/+5
|
* collect and emit reduction action itemsAdrian Thurston2015-10-061-4/+9
|
* load reduction nontermsAdrian Thurston2015-10-051-2/+2
|
* added syntax dedicated to reductionsAdrian Thurston2015-10-051-0/+2
| | | | | This avoids interferrence with existing parsing code. Calling the commit/reduce code only if the reduce construct is used.
* load reduction actions and generate a commit containing themAdrian Thurston2015-10-041-3/+3
|
* sketched a grammar for reduction sectionsAdrian Thurston2015-10-041-0/+48
|
* allow globals to be declared in namespacesAdrian Thurston2015-08-091-0/+1
|
* now scoping functions inside the namespaces they are declared inAdrian Thurston2015-08-091-1/+1
|
* allow switch statements to be wrapped in {}colm-barracuda-v4Adrian Thurston2015-06-171-1/+2
| | | | Required for unambiguously nesting switch switch statements.
* adding commit points to switch clausesAdrian Thurston2015-06-081-13/+19
|
* replacing list and map with vlist and vmapAdrian Thurston2015-06-061-13/+3
|
* brought back the comma to param/arg listsAdrian Thurston2015-05-031-4/+12
|
* first cut of C extensionsAdrian Thurston2015-04-011-0/+8
|
* some code cleanup, clone removalAdrian Thurston2015-02-131-0/+4
|
* first cut of value-based ints, test cases passAdrian Thurston2015-01-271-0/+4
|
* require that a new parser of a context-type receive the context at new timeAdrian Thurston2015-01-241-1/+1
|
* implemented capture for newAdrian Thurston2015-01-241-1/+1
|
* mandatory arg list for newAdrian Thurston2015-01-241-1/+1
|
* allow alias inside context declarationsAdrian Thurston2015-01-181-0/+1
|
* setting the map el sizeAdrian Thurston2015-01-171-1/+1
|
* some work on the object-based map genericAdrian Thurston2015-01-161-2/+2
|
* brought back the pointer deref for reverse loadAdrian Thurston2015-01-161-2/+0
| | | | | | | | Resurrected the pointer deref instruction for loading during reverse execution. Fixed the lastPtrInQual computation for structs and generics. Removed the deref syntax.
* TYPE_PTR is no longer generated anywhereAdrian Thurston2015-01-111-1/+0
|
* some cleanup in the parser/loaderAdrian Thurston2015-01-051-4/+2
|
* push towards embedded list elementsAdrian Thurston2015-01-041-0/+8
|
* some name changing context -> structAdrian Thurston2015-01-041-6/+6
|
* removed the multi-embeddable list code (aapl style)Adrian Thurston2015-01-021-16/+2
| | | | Left this work on branch embedded-list-el.
* commit to object semantics for newAdrian Thurston2014-12-251-2/+0
|
* hacked together some struct (non-tree) semanticsAdrian Thurston2014-12-191-0/+1
| | | | Can new, get and set non-tree objects (very limited features).
* added struct, struct field and corresponding instructionsAdrian Thurston2014-12-141-0/+1
| | | | | Can new and set/get the fields of a struct. Still using underlying tree object to implement.
* added a syntax for declaring list element pointersAdrian Thurston2014-12-071-0/+10
|