aboutsummaryrefslogtreecommitdiff
path: root/driver/parser_test.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Import source code of lexer generatorRyo Nihei2022-11-101-838/+0
| | | | From: https://github.com/nihei9/maleeni
* Remove anonymous symbol systemRyo Nihei2022-11-051-20/+48
| | | | Remove unimportant features to tidy up the specification.
* Remove alias systemRyo Nihei2022-11-051-15/+19
| | | | Remove unimportant features to tidy up the specification.
* Prohibit using a pattern in an alternativeRyo Nihei2022-06-121-6/+8
| | | | | | When a syntax error occurs, the parser must provide a user with the names of expected tokens. However, if a pattern appears directly in an alternative, Vartan cannot assign an appropriate name to the pattern. Therefore, this commit prohibits alternatives from containing patterns.
* Remove the kind field from a node corresponding to an anonymous terminal symbolRyo Nihei2022-06-111-8/+12
|
* Rename spec package to spec/grammar packageRyo Nihei2022-05-271-1/+1
|
* Allows a directory to be specified as the --output option for the ↵Ryo Nihei2022-05-221-1/+1
| | | | vartan-compile command
* Stop supporting SLR(1) and always use LALR(1)Ryo Nihei2022-05-221-62/+55
|
* Prohibit using escape sequences in string literalsRyo Nihei2022-05-151-0/+24
|
* Add ordered symbol notationRyo Nihei2022-05-101-7/+7
|
* Change syntax for top-level directivesRyo Nihei2022-05-101-29/+37
| | | | | | | | | | | | | %name changes to: #name example; %left and %right change to: #prec ( #left a b #right c d );
* Make #prec directive change only precedence and not associativityRyo Nihei2022-05-101-2/+47
|
* Add --json option to vartan-parse commandRyo Nihei2022-05-101-5/+7
|
* Add tests for driverRyo Nihei2022-04-161-3/+155
|
* Move compiler tests from driver package to grammar packageRyo Nihei2022-04-141-545/+2
|
* Allow arbitrary user-defined types for nodes in a syntax treeRyo Nihei2022-04-031-14/+14
|
* Allow an alternative to have multiple directivesRyo Nihei2022-03-301-2/+116
|
* Move directives given to lexical productionsRyo Nihei2022-03-291-44/+82
| | | | | Move all directives given to lexical productions from alternative directives to production directives. This change aims to ensure consistency with respect to the syntax of definitions of terminal symbols and non-terminal symbols.
* Change syntax of production directivesRyo Nihei2022-03-291-12/+16
| | | | | | | The position of directives given to productions has moved from before a left-hand side value to after a left-hand side value. This change aims to simplify the syntax. However, there is no change in positions of directives given to alternatives.
* Use IDs and labels as parameters of an #ast directive instead of symbol ↵Ryo Nihei2022-03-291-4/+102
| | | | positions
* Add label notationRyo Nihei2022-03-291-0/+60
|
* Simplify the syntax of #ast directiveRyo Nihei2022-03-281-19/+4
| | | | This change allows using the simple syntax of the directive like `#ast $1 $3...` instead of `#ast #(foo $1 $3...)`.
* Add vartan-go commandRyo Nihei2022-03-271-3/+4
|
* Use a lexer via interfaceRyo Nihei2022-03-271-1/+6
|
* Use grammar via an interfaceRyo Nihei2022-03-231-1/+1
|
* Add name directive to specify a grammar nameRyo Nihei2021-10-281-0/+105
|
* Use maleeni v0.5.1Ryo Nihei2021-10-271-12/+12
|
* Make semantic actions user-configurableRyo Nihei2021-09-031-5/+6
|
* Add #prec directive to set precedence and associativity of productionsRyo Nihei2021-08-301-0/+92
|
* Add error symbol and #recover directive to recover from an error stateRyo Nihei2021-08-261-0/+92
|
* Support %left and %right to specify precedences and associativitiesRyo Nihei2021-08-221-0/+52
|
* Resolve conflicts by default rulesRyo Nihei2021-08-211-12/+12
| | | | When a shift/reduce conflict occurred, we prioritize the shift action, and when a reduce/reduce conflict occurred, we prioritize the production defined earlier in the grammar file.
* Support LALR(1) classRyo Nihei2021-08-151-40/+47
|
* Generate an AST and a CST only when they are necessaryRyo Nihei2021-08-041-1/+1
|
* Detect duplicate names between terminals and non-terminalsRyo Nihei2021-07-311-0/+26
|
* Prevent terminals used in productions from being skippedRyo Nihei2021-07-311-0/+11
| | | | A terminal symbol used in productions cannot have the skip directive.
* Detect unused-symbol errorRyo Nihei2021-07-301-0/+43
| | | | When there are productions and terminals that are cannot be reached from the start symbol, the compiler reports an error.
* Detect duplicate production errorsRyo Nihei2021-07-281-0/+42
|
* Add literal pattern syntax and change tree structure syntaxRyo Nihei2021-07-221-5/+5
| | | | | | - Literal patterns don't interpret the special characters of regular expressions. In other words, 'abc|def' matches only `abc|def`, not `abc` or `def`. - Change tree structure syntax from '(...) to #(...).
* Write a description fileRyo Nihei2021-07-221-2/+4
| | | | The description file describes a LR(0) item set and conflicts (if any).
* Detect multiple semantic errors in a single parseRyo Nihei2021-07-181-1/+2
|
* Add testing for the driverRyo Nihei2021-07-151-0/+44
| | | | The driver can reduce productions that have the empty alternative and can generate a CST (and AST) node.
* Allow directives to take multiple parametersRyo Nihei2021-07-021-1/+3
|
* Prettify treesRyo Nihei2021-07-021-2/+3
|
* Simplify syntax of modifiers and semantic actionsRyo Nihei2021-06-301-15/+15
| | | | Modifiers and semantic actions are represented by directives following the '#' symbol.
* Add testing for the driverRyo Nihei2021-06-291-1/+114
|
* Add ast actionRyo Nihei2021-06-281-22/+87
|
* Add syntax of fragmentRyo Nihei2021-06-201-0/+11
|
* Add skip actionRyo Nihei2021-06-201-0/+12
|
* Add syntax of modifiers and actionsRyo Nihei2021-06-201-23/+65
| | | | | Currently, a mode modifier and push/pop actions are available. The modifier and the actions make sense in only lexical specifications.