summaryrefslogtreecommitdiff
path: root/src/parsetree.h
Commit message (Collapse)AuthorAgeFilesLines
* added with_ignore(tree) iteratorAdrian Thurston2020-12-231-2/+2
| | | | | | | | | | | | This is identical to the basic tree iterator, except it visits ignore tokens. This makes it possible to rewrite comments, albeit, primitively. Constructors for tokens don't work right. Though we can set the data field. The following code can be used to turn comments into newlines: for I1: comment in with_ignore(Flux) { I1.data = "\n" }
* renamed DefList and LelDefList to the more accurate ProdList, LelProdListAdrian Thurston2020-04-121-5/+5
|
* first cut of a redefine statementAdrian Thurston2020-04-121-0/+3
| | | | | | | | 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/+3607
|
* moved the original colm src dir to /colmAdrian Thurston2019-09-081-3605/+0
|
* merging aapl src dirs: added CmpStr and CmpString to colm/aaplAdrian Thurston2019-09-081-6/+6
| | | | | | | | CmpStr is defined in colm/*.h so we need to also move it aside when we add it to aapl. With this commit there are no more diffs between the aapl src dirs, with the exception of a three files added to the aapl-repos package. Will use this as the definitive version.
* pushing the trim decision to run-timeAdrian Thurston2019-05-241-3/+10
| | | | | | | | | 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/+1
| | | | syntax is $*N
* make the rhs of switch vars available in case clausesAdrian Thurston2018-05-201-2/+6
|
* removed stopId from parse frag instructionAdrian Thurston2018-05-151-1/+0
|
* unified parse frag and finishAdrian Thurston2018-05-151-0/+9
|
* allow sending to lists of streamsAdrian Thurston2018-05-121-0/+3
|
* don't disable parse revert based on what's being manpiulatedAdrian Thurston2018-05-111-1/+1
| | | | Other tests always cause this to come out non-disabled anyways.
* moved all the parse finish codegen to one functionAdrian Thurston2018-05-091-1/+5
|
* removed print statements, using only the send statementAdrian Thurston2018-05-071-6/+0
|
* allow a prod-name case clause to also have a patternAdrian Thurston2018-03-111-1/+2
|
* allow switching on production numbersAdrian Thurston2018-03-091-9/+46
| | | | | Added a form to case statements that accepts a production name instead of a pattern.
* updated Copyright yearsAdrian Thurston2018-03-041-1/+1
|
* organizing the reduce code generatorAdrian Thurston2017-07-291-1/+6
|
* added a read_reduce statement to call postfix reducerAdrian Thurston2017-07-271-1/+5
| | | | Triggers the generation of the reducer. Accepts a stream.
* started on a tree print in postfix notationAdrian Thurston2017-07-201-0/+1
| | | | | Postfix notation can be used as a streaming tree format as both an output and input.
* minor fixes: a missing cast, no comma at enum end, no redefined typedefsPeter Reijnders2016-12-191-4/+4
|
* migrated from GPLv2 to MIT licenseAdrian Thurston2016-12-131-17/+18
|
* an automated include convention improvement from Peter ReijndersAdrian Thurston2016-12-131-11/+14
|
* removed clones of cons-item-list resolveAdrian Thurston2016-10-291-0/+1
|
* auto-trim in print, send and construct, disable with @Adrian Thurston2016-10-011-2/+5
| | | | | | | | | | | | | | 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.
* implemented a const-string define option -Ename=valAdrian Thurston2016-07-281-0/+8
|
* allow omission of location in reductionsAdrian Thurston2015-11-301-1/+6
| | | | | | | There is code in here for omission of location and data in reductions. Unfortunately we cannot enable the omission of data unless we make changes to the backtracking. In the current implementation we push the token data with an mcopy from the data in the token.
* split reducers into their own classAdrian Thurston2015-11-051-3/+9
| | | | Previously selected with a runtime int. Using reduction name as the class name.
* allow access to rhs elements by numberAdrian Thurston2015-11-011-0/+3
|
* allow multiple reducersAdrian Thurston2015-10-211-2/+9
| | | | selection is currently manual using a numberical identifier
* reduction actions: add loc reference, elim duplicate labelsAdrian Thurston2015-10-081-0/+3
|
* collect and emit reduction action itemsAdrian Thurston2015-10-061-7/+23
|
* generate the union and size parse tree according to itAdrian Thurston2015-10-051-6/+7
|
* load reduction nontermsAdrian Thurston2015-10-051-0/+18
|
* added syntax dedicated to reductionsAdrian Thurston2015-10-051-1/+3
| | | | | 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-0/+39
|
* working on a commit that can execute reduction actionsAdrian Thurston2015-10-041-1/+3
| | | | | | First track if the result is used. If not, we can remove parse trees at commit points. This is also the time to execute reduction actions so we can load as we parse. Not currently enabled (by way of omitting setting of not-used bit).
* allow globals to be declared in namespacesAdrian Thurston2015-08-091-3/+5
|
* now scoping functions inside the namespaces they are declared inAdrian Thurston2015-08-091-58/+76
|
* moved MethodMap into NameScope, converted some ptrs to objsAdrian Thurston2015-08-081-12/+11
|
* more cleanup in the list and map type resolve/declareAdrian Thurston2015-06-141-0/+6
|
* cleanup in the list and map typesAdrian Thurston2015-06-141-17/+6
|
* cleanup and simplification, generic elements and variousAdrian Thurston2015-06-131-0/+3
|
* some cleanup around the unified list and map genericsAdrian Thurston2015-06-081-4/+4
|
* now creating list and map el structures in the declare passAdrian Thurston2015-06-071-9/+30
|
* some nameing cleanup around list and list elAdrian Thurston2015-06-061-15/+8
|
* replacing list and map with vlist and vmapAdrian Thurston2015-06-061-5/+11
|
* more of the vlist implementation .. moved all test cases to vlistAdrian Thurston2015-06-051-2/+4
|
* more application of C naming conventionsAdrian Thurston2015-05-151-15/+11
|