Skip to content

Releases: nihei9/vartan

v0.6.0

10 Nov 15:16
Compare
Choose a tag to compare
  • acc2df9 - Stop handling panic to print a stack trace.
  • 15ea142 - Prohibit using escape sequences in string literals.
  • a443f0a - Prohibit applying the expansion operator to anything other than identifiers.
  • 24fd805 - Prohibit applying #left, #right, #assign, and #prec to an error symbol. The shift of the error symbol is an operation forced by the driver. Therefore it is impossible to change this behavior by giving precedence to the error symbol. If we desire to change the precedence of a production rule with the error symbol, we can use #prec directive.
  • b5ad1d3 - Stop supporting SLR(1) and always use LALR(1).
  • def1459 - Allows a directory to be specified as the --output option for the vartan compile command.
  • 4c0f7eb - Rename spec package to spec/grammar package.
  • ceb6649 - Add vartan test command.
  • 1ebed92 - Support testable tree output in vartan parse command.
  • 7403c18 - Remove the kind field from a node corresponding to an anonymous terminal symbol.
  • 52ad315 - Support the underscore symbol matching any symbols in vartan test command.
  • 2dd098d - Prohibit using a pattern in an alternative. 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.
  • 4b2cf7b - Support testing token's texts in vartan test command.
  • 017b1b2 - Fix parse error messages for tree parser.
  • 2fcab70 - Prohibit error node having children.
  • 9033157 - Remove underscore syntax matching any symbol.
    Underscore syntax:
    For instance, a tree (expr (id 'a') (add '+') (_)) matches both source codes a + b * c and a - b / c.
    This feature is helpful because it allows you to emphasize the main points of the test by ignoring nodes of no interest. However, we will remove the feature for the time being to reconsider the grammar.
  • d45b860 - Add tests.
  • 5da3885 - Upgrade Go compiler to v1.19.
  • ffa153b - Update README.
  • b24f61a - Remove alias system to tidy up the specification.
  • a6001b3 - Remove anonymous symbol system to tidy up the specification.
  • a0aa647 - Move the skip table from lexer-related data to parser-related data.
  • a84350c - Split SymbolTable's APIs into reader/writer.
  • f89d021 - Import source code of lexer generator from maleeni.

v0.5.0

10 May 14:35
Compare
Choose a tag to compare
  • f7484ef1 - Add --json option to vartan parse command to print a syntax tree in JSON format.
  • 0eb44f04 - Make #prec directive change only precedence and not associativity.
  • 3eb0e88f - Change syntax for top-level directives. %name, %left, and %right changed to #name, #left, and #right, respectively.
  • 2438fa44 - Add #assign directive to change only precedence.
  • dd5fd337 - Add the ordered symbol notation $<Identifier>.
  • 0ff00d27 - Change the suffix of a description file from -description.json to -report.json.
  • 0b858d66 - Change the default suffix of a grammar file from .vr to .vartan.
  • 054307b6 - Make the identifier format strict.
  • 3e1620a7 - Add spelling inconsistencies check.
  • abf78681 - Follow golangci-lint.

v0.4.1

22 Apr 13:44
Compare
Choose a tag to compare
  • 18a3317, 97d3696, 8340b9f, 533c454 - Enhance tests.
  • 389dd01 - Prohibit specifying associativity and precedence multiple times for a symbol.
  • 9a9444b - Prohibit using the same element multiple times in an #ast directive.
  • 8bf4d23 - Prohibit ambiguous symbol in an #ast directive.
  • b0bf8eb - Update dependencies.
  • 0aa3e53 - vartan show command prints only adopted actions when conflicts occur.
  • 0f5c301 - Suppress a report about conflicts resolved explicitly.

v0.4.0

02 Apr 17:06
Compare
Choose a tag to compare
  • ed2c201 - Change semantic action APIs. A parser reports whether it recovered from an error to the semantic action APIs via the argument recovered.
  • 72da4b0 - Add SemanticActionSet.TrapAndShiftError method instead of TrapError and ShiftError methods.
  • 0cf26ed - Call SemanticActionSet.MissError method when an input doesn't meet an error production.
  • a57fda7 - Pass a token that caused a syntax error to the semantic action APIs.
  • 1dd7fef - Generate the lexer source code.
  • 83bc2b1, ba524fa, d3867e0, d0431e3 - Add vartan-go command.
  • 5212b7f, bb9bf49 - Use golangci-lint.
  • 1746609, ed43562, 4d2a389 - Use IDs and labels as parameters of an #ast directive instead of symbol positions.
  • dbd2e20 - Change syntax of production directives. 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.
  • 90f28b5 - 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.
  • a1e4ae7 - Allow an alternative to have multiple directives.
  • 1d0a67b, b565c7d - Update dependency.
  • 5c26f61 - Print a parse tree in vartan parse command even if syntax errors occur.
    When there is a parse tree, print it.
  • 0636432 - Remove --grammar option from vartan compile command.
  • 8a6cfba, 8fda704, 180cac3 - Update documents.
  • 14b2d7e - Allow arbitrary user-defined types for nodes in a syntax tree.

v0.3.0

03 Sep 10:29
Compare
Choose a tag to compare
  • 7271e46b - Add error symbol and #recover directive to recover from an error state.
  • a769f496 - Add an #alias directive to define a user-friendly name of a terminal.
  • 4fda9eb3 - Support the escape sequecens \' and \\ in a string literal.
  • 936b600c - Use a pattern string defined by a string literal as its alias.
  • b70f4184, d904e822 - Add show command to print a description file.
  • bb85dcc5 - Add precedences and associativities to the description file.
  • 3584af7b - Add #prec directive to set precedence and associativity of productions.
  • ccf0123d - Remove the expected terminals field from the parsing table. The driver searches the expected terminals corresponding to each state if necessary.
  • 8832b64b, 0bcf9458 - Support LAC (lookahead correction).
  • f4e3fef0 - Make semantic actions user-configurable.
  • ad35bf24 - Use the LALR by default when using grammar.Compile instead of the CLI.

v0.2.0

22 Aug 15:01
Compare
Choose a tag to compare
  • 00f8b09 - Support LALR(1) class.
  • 05738fa - Print a stack trace only when a panic occured.
  • 118732e - Fix panic on a syntax error.
  • 6c2036e - Fix indents of a tree.
  • 94e2400 - Resolve conflicts by default rules. 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.
  • 4d879b9 - Support %left and %right to specify precedences and associativities.
  • 02674d7 - Add a column number to an error message.
  • dc78a8b - Add a column number to a token.
  • 6cfbd0a - Fix panic on no productions.

v0.1.1

05 Aug 14:36
Compare
Choose a tag to compare
  • bb878f9 - Fix the name of the EOF symbol in the description file. The EOF is displayed as <EOF>, not e1.
  • c14ae41 - Generate an AST and a CST only when parser options are enabled.
  • b8ef796 - Add --cst option to vartan parse command.
  • 2bf3786 - Avoid the growth of slices when constructing trees.
  • 7b4ed66 - Add --only-parse option to vartan parse command.
  • 3d417d5 - Print a stack trace on panic.

v0.1.0

02 Aug 13:10
Compare
Choose a tag to compare
  • vartan v0.1.0, this is the first release, supports the following features.
    • vartan compile: SLR parsing table generation
      • Definitions of grammars by simple DSL
      • Automatic AST construction by #ast directive
    • vartan parse: Driver for the parsing table