aboutsummaryrefslogtreecommitdiff
path: root/driver (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make #prec directive change only precedence and not associativityRyo Nihei2022-05-101-2/+47
|
* Add --json option to vartan-parse commandRyo Nihei2022-05-102-27/+79
|
* vartan-show command prints only adopted actions when conflicts occurRyo Nihei2022-04-211-5/+0
|
* 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-033-196/+219
|
* Print a parse tree even if syntax error occurRyo Nihei2022-04-011-2/+8
| | | | | A parser can construct a parse tree even if syntax error occur. When there is a parse tree, print it.
* Allow an alternative to have multiple directivesRyo Nihei2022-03-301-2/+116
|
* Move directives given to lexical productionsRyo Nihei2022-03-294-71/+136
| | | | | 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-278-47/+613
|
* Use a lexer via interfaceRyo Nihei2022-03-279-91/+183
|
* Use grammar via an interfaceRyo Nihei2022-03-237-48/+172
|
* Add name directive to specify a grammar nameRyo Nihei2021-10-285-0/+133
|
* Use maleeni v0.5.1Ryo Nihei2021-10-274-17/+18
|
* Pass a token that caused a syntax error to the semantic action APIsRyo Nihei2021-09-073-15/+16
|
* Call the 'MissError' when input doesn't meet an error productionRyo Nihei2021-09-072-1/+7
|
* Add the semantic action API 'TrapAndShiftError' instead of 'TrapError' and ↵Ryo Nihei2021-09-073-52/+35
| | | | 'ShiftError'
* Change semantic action APIsRyo Nihei2021-09-073-18/+42
| | | | The driver reports whether it recovered from an error to the semantic action APIs via the argument `recovered`.
* Add tests for LACRyo Nihei2021-09-031-0/+113
|
* Make semantic actions user-configurableRyo Nihei2021-09-036-242/+521
|
* Support LAC (lookahead correction)Ryo Nihei2021-09-021-29/+115
|
* Remove the expected terminals field from the parsing tableRyo Nihei2021-08-311-10/+15
| | | | The driver searches the expected terminals corresponding to each state if necessary.
* RefactorRyo Nihei2021-08-301-165/+215
|
* Add #prec directive to set precedence and associativity of productionsRyo Nihei2021-08-301-0/+92
|
* Add an #alias directive to define a user-friendly name of a terminalRyo Nihei2021-08-281-25/+17
|
* Add error symbol and #recover directive to recover from an error stateRyo Nihei2021-08-263-27/+336
|
* Add a column number to a tokenRyo Nihei2021-08-221-2/+10
|
* Support %left and %right to specify precedences and associativitiesRyo Nihei2021-08-222-0/+297
|
* Resolve conflicts by default rulesRyo Nihei2021-08-212-12/+121
| | | | 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.
* Fix indents of a treeRyo Nihei2021-08-191-1/+1
|
* Fix panic on a syntax errorRyo Nihei2021-08-151-3/+5
|
* Support LALR(1) classRyo Nihei2021-08-151-40/+47
|
* Add --only-parse option to the parse commandRyo Nihei2021-08-051-6/+11
| | | | When this option is enabled, the parser performs only parse and doesn't semantic actions.
* Avoid the growth of slices when constructing treesRyo Nihei2021-08-051-5/+25
|
* Generate an AST and a CST only when they are necessaryRyo Nihei2021-08-042-59/+99
|
* Print expected terminals on a parse errorRyo Nihei2021-08-021-2/+44
|
* Use maleeni v0.3.0Ryo Nihei2021-08-011-2/+2
|
* 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-152-0/+47
| | | | 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
|