summaryrefslogtreecommitdiff
path: root/grammar
Commit message (Collapse)AuthorAgeFilesLines
* go grammar: added initial (small) testing files and utf8.lmAdrian Thurston2019-12-157-18/+1656
|
* 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.
* 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 backtick literals to have an end quote.Adrian Thurston2019-11-281-50/+50
| | | | | | | | | | | | | | 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.
* ragel pcre: collecting verbs, atomic group, catpure reset, and backrefAdrian Thurston2019-11-171-19/+139
|
* rust grammar: right-recursive statement list kills performanceAdrian Thurston2019-11-141-2/+6
| | | | This adds to the argument for issue #74.
* rust grammar: removed an ambiguity that really slows down parsingAdrian Thurston2019-11-141-2/+1
| | | | | Ambiguity between [ a.b( c ) ] and [ a.b ] ( c ) was causing unnecessary backtracking.
* ragel pcre: handling backrefs and octalsAdrian Thurston2019-11-121-0/+79
|
* ragel pcre: parsing and storing quantifiersAdrian Thurston2019-11-121-17/+124
|
* ragel pcre: added some basic literal formsAdrian Thurston2019-11-111-3/+59
|
* rust: take advantage of exclusion of ? from pos 2+ of literalsAdrian Thurston2019-11-072-100/+67
| | | | Can now write `,? to mean an optional comma.
* rust grammar: various fixesAdrian Thurston2019-11-051-8/+14
|
* rust grammar: various improvementsAdrian Thurston2019-11-041-16/+122
|
* rust grammar: various improvementsAdrian Thurston2019-11-032-44/+107
| | | | Now testing on cranelift.
* rust grammar: traits, enums, various fixesAdrian Thurston2019-10-311-16/+108
|
* added DNS grammar in RagelAdrian Thurston2019-10-283-1/+704
|
* PCRE grammar in colmAdrian Thurston2019-10-273-5/+596
|
* start of a PCRE parser in C/RagelAdrian Thurston2019-10-273-3/+513
| | | | | | Basic structure is there, needs to be filled in. So far it handles sub-expressions, lookarounds, acaccepts characters a-z and optinos c and i. Most of what is done so far is tree building.
* rust grammar: work on various parts of the grammarAdrian Thurston2019-10-221-64/+280
| | | | | | Added or improved macro definitions, generics, tuple types, generics, closures, visibitlity, type param bounds, modules, where clauses, byte strings, method params, struct expressions, and more.
* rust grammar: building out more of the grammarAdrian Thurston2019-10-201-16/+177
| | | | now testing on rust in the wild
* rust grammar: work on patterns, methods, paths, loopsAdrian Thurston2019-10-184-84/+223
|
* rust grammar: expanded use_declarataion to include {} and *Adrian Thurston2019-10-171-5/+49
|
* rust grammar: added else blocks and rudimentary floatAdrian Thurston2019-10-071-12/+29
|
* rust grammar: lifetime goes between & and mut in type refAdrian Thurston2019-10-031-2/+3
|
* rust grammar: some improvements to genericsAdrian Thurston2019-10-031-23/+119
|
* improvements to statement and expression to better match grammarAdrian Thurston2019-10-021-53/+62
| | | | | | | | Previous version was made to work based on example code. This version is based off the grammar in the rust-lang book and handles expressions with blocks, which do not require semis in a statement list (did not handle this before), and also the expression without block at the end of a statement list, without requiring a semi (handled this before).
* rust grammar: some work on match expressionsAdrian Thurston2019-10-021-8/+62
|
* rust grammar: let needs a pattern on lhsAdrian Thurston2019-10-011-2/+43
|
* moved rust grammar to /grammarAdrian Thurston2019-10-013-0/+327