summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* colm: testing a new grammar where string concatenations are allowedliteral-concatenationAdrian Thurston2019-12-282-34/+51
| | | | | | | | | | | | | | | | | | | | | | | | | This commit brings back string concatenations in match/cons/string literals at the top level. It does not bring back concatenation of [] lists. For example, you can write: match Foo "hi "there BUT NOT: match Foo [Hi] [There] The concatenation (of both forms) was removed when bare sends were added, due to the ambiguity created. However, removing these concatenations has proven quite annoying. This change re-introduces the ambiguity, which maybe we should do something about by detecting when it is likely via mis-alignments of the strings, or making some other change to sends. refs #95
* ragel julia: upgrades tests to 1.0 of julia languageAdrian Thurston2019-12-284-19/+35
| | | | | | | | | | | | | | | | | The string class is no longer containing uints, now signed. Convert the input strings to vectors of uint8s, since the julia code generator currently supports only uint8. Use numerical representation of 'a' since we have no way to separate single lits from double lits and cast them in the julia test case translator Don't try to construct AbstractString, use String. Array constructor Array{Int, 1}(undef, 20) must take undef as first arg. Verify we have julia 1.0 or later in configure script. refs #91
* ragel testing: try gdc-8 down through gdc-5Adrian Thurston2019-12-271-1/+11
|
* ragel: check that javac worksAdrian Thurston2019-12-271-0/+18
| | | | | If ulimit -a is used, javac may not run. Added a configure check to verify it runs. refs #92
* colm: proper implementation of both left and right recursion in c++Adrian Thurston2019-12-279-50/+66
| | | | | Not doing these in colm. Relying on th existing correct implementation. Also removed the naming conflict between left and right recursion.
* colm rewriting: newly generated prods should go above where they are createdAdrian Thurston2019-12-271-40/+48
| | | | | | | | | | | Redid the sublist implementation in colm such that the new produciton is placed immediately above the place where it it was first referenced. Works better in the face of of namesapce usage Also removed the repeat implementations. These are already correct in the C++ program so no sense in redoing them. This is in line with the notion that we can use colm transformations for new language features, before they are eventually moved into the main program.
* allow simple variable defs in colm bootstrap grammarAdrian Thurston2019-12-272-2/+32
| | | | | These are allowed, but ignored in bootstrap0 and bootstrap1. We can then use them in the rewriter to log changes we made.
* Created a common superclass for the export classesAdrian Thurston2019-12-276-65/+70
| | | | | | Every class representing Colm types has a program and tree pointer and some common functions. Moving this out allows us to pass the common base to the repeat iterator and eliminate the first argument to the iterator.
* disable julia tests until we can sort out changesAdrian Thurston2019-12-261-0/+6
| | | | | | The Julia language has changed enough to break our tests. Disable them for now. refs #91
* some improvements to the --with-colm build optionAdrian Thurston2019-12-262-5/+21
| | | | | This flag is not for production building. Bootstrapped build should always be used.
* left/right-independent iterator for repeats in top-down loadsAdrian Thurston2019-12-268-158/+259
| | | | | | | | | | Added an iterator for repeats that is independent of left/right recursion. Using it in colm load and tests. Allows us to remove the special case for repeat/list types in the export. The new iterator is implemented as a non-recursive generic tree iterator. refs #90
* run the build-test action on our own git action runnerAdrian Thurston2019-12-221-1/+1
|
* use left-recursing in the colm grammarAdrian Thurston2019-12-2213-70/+142
| | | | | | Also moved the implementation to C++ because for the time being we need to generate an appropriate iterator in the export interface. Need a genereric repeat iterator to avoid this situation.
* with-colm build: need to make tar dir, added a check for the colm binAdrian Thurston2019-12-222-4/+9
|
* testing: fixed EXTRA_DIST in test/aapl.d/Adrian Thurston2019-12-212-3/+2
|
* testing: added missing *.exp files to dist, don't configure with crackAdrian Thurston2019-12-212-1/+9
|
* fixes for the build-test actionAdrian Thurston2019-12-201-2/+2
| | | | Would be great to be able to test these before checking in and pushing.
* fixed dist: removed timed from MakefileAdrian Thurston2019-12-201-1/+1
|
* build-test action: also unpack and test the distAdrian Thurston2019-12-201-0/+19
|
* testing: merged runtests and timed, removed system variation from some testsAdrian Thurston2019-12-208-87/+102
|
* testing: added a configure check for ASM testsAdrian Thurston2019-12-192-3/+44
| | | | | Addded a configure check to see if the ASM tests are appropriate. If we can build a basic ASM file with .rodata references, assume we can run the tests.
* testing: list the tests that failedAdrian Thurston2019-12-192-2/+3
|
* don't run objective-c tests if gnustep config is not availableAdrian Thurston2019-12-182-1/+12
|
* testing: propagate internal and test case failures to exit statusAdrian Thurston2019-12-182-6/+24
|
* configure: verify that julia is able to run programsAdrian Thurston2019-12-181-0/+14
| | | | | | Julia requires a large virtual address space and if a system limits address space size with ulimit then julia will abort. Catch it in configure, rather than resulting in failed tests.
* merge remote-tracking branch 'konstantin/cmake'Adrian Thurston2019-12-173-10/+39
|\
| * cmake: restore projectKonstantin Podsvirov2019-12-163-10/+39
| | | | | | | | Partially fix #87
* | build-test CI: need to disable manual buildingAdrian Thurston2019-12-171-1/+1
| |
* | need to call autogen.sh for build-test github actionAdrian Thurston2019-12-171-0/+2
| |
* | added build-testing github workflowAdrian D. Thurston2019-12-171-0/+17
|/
* loadcolm cannot be shared by bootstrap0 and colmAdrian Thurston2019-12-156-2872/+2880
| | | | | | | | | | | | Attempting to do so results in the following circular dependency: loadcolm.cc -> if3.h -> boostrap2 -> loadcolm.cc Fix this by using the source file loadfinal.cc, which is not is not compiled directly, but rather included in sources. It is used for both bootstrap2 and colm, but these programs each use separate gen/if[23].h headers, so this file is included by distinct source files that each bring in the appropriate dependency, then include this file.
* build system fixesAdrian Thurston2019-12-151-8/+15
| | | | | | | | | | | 1. The version.h file needs to be listed in BUILT_SOURCES ahead of it's use in a sources list. 2. The gen/if[123].h files, even though they are listed in BUILT_SOURCES, are not getting built ahead of their use in include files. Solution here is to list dependency explicitly. See note in source file. refs #87
* go grammar: added initial (small) testing files and utf8.lmAdrian Thurston2019-12-157-18/+1656
|
* testing left-recursive lists <* and <+ and sublists in productionsAdrian Thurston2019-12-145-4/+88
| | | | | | | Using a transformation pass in prog.lm to create definitions for left-recursive productions and sub-productions. So far just a sketch. Not all production element forms are transformed and there can only be one sub-production in a whole program. refs #74 refs #83 refs #84
* colm: generate an archive (using makefile) when outputing multiple filesAdrian Thurston2019-12-142-22/+42
| | | | | | | | Using a build step that generates multiple files is not convenient to use with automake because it prevents us from using BUILT_SOURCES and requries that we specify some dependencies manually. Testing out the idea of building an archive, rather than multiple files, then using separate make rules to pull out the individual files.
* colm: added an extra bootstrap stage, allowing transformationsAdrian Thurston2019-12-133-31/+58
| | | | | | Added a third bootstrap program. This program can accept a colm grammar in colm, plus transformation also in colm, allowing us to implement additional syntax/semantics using colm transformations.
* go grammar: added lexical definitions and semi insertionAdrian Thurston2019-12-134-118/+185
| | | | | Ooof this makes a big output file. May need to do something about it. refs #82
* go grammar: started with the unicode definitionsAdrian Thurston2019-12-118-1/+327
| | | | | Generating the utf8 encoded unicode defintitions that are referenced in the Go specification. Can start to build the grammar with these definitions on hand.
* colm: add -R option, which allows hex ranges to cross 0Adrian Thurston2019-12-114-8/+31
| | | | | | This is a quick hack to address issue #81. Since colm uses signed alphabets it is not possible to specify ranges that cross zero in hex, which is desirable for utf8. For example 0x20 .. 0xa0 will throw an error in a signed char mode.
* added C++ and Python grammars, taken from test suiteAdrian Thurston2019-12-0112-6/+3260
| | | | | These both need to be updated and tested for code in the wild. They were originally developed to showcase colm features.
* moved grammars out to their own dirsAdrian Thurston2019-12-0113-23/+40
| | | | | We also want some testing/validation support for each grammar. This dir will get quite messy if we move files.
* rust grammar: a proper implementation of raw stringsAdrian Thurston2019-11-301-8/+41
|
* rust grammar: handle floats specified with just a trailing dotAdrian Thurston2019-11-301-1/+8
| | | | let a = 0. + 1.- 2.3;
* rust grammar: partial impl of floatsAdrian Thurston2019-11-291-2/+10
|
* allow use of token keyword for literal defsAdrian Thurston2019-11-292-2/+6
| | | | refs #79
* updated EXTRA_DIST in test/ragel.d and fixed rlparse COLM refAdrian Thurston2019-11-292-19/+32
|
* allow backtick literals to have an end quote.Adrian Thurston2019-11-284-54/+59
| | | | | | | | | | | | | | Rather than exclude ? + and *, exclude ` from literals and allow backtick literals to be end quoted. Allows us to follow the literal with an operator without using a space between the two, which is very unnatural. Can write: [`,`?]. If we forget to the end quote it we end up with literal that (probably) does not exist. It should generate an error, rather than silently give us something we don't want. Note that ] is still excluded from literals in positions 2+.
* revert mod to rust grammar to take advantage of ? excluded from ` litsAdrian Thurston2019-11-281-47/+47
| | | | | | This reverts some aspects of bb02b4be1b9db09c27cbd11df28a89e5b1ed332f. There were some other changes in this commit we want to keep, so it was undone manually.
* revert "exclude ? from position 2+ of literal token"Adrian Thurston2019-11-285-25/+9
| | | | This reverts commit bd8de42f05975c262a6ecd156d8a6fbc50aa0de5.
* revert "updated test suite for exclusion of ? from pos 2+ of ` lits"Adrian Thurston2019-11-284-9/+13
| | | | This reverts commit 38f0495adf51690aa7b71800a907e2e59da49651.