Skip to content

Can't parse postgresql grammar and missing error location #68

@mingodad

Description

@mingodad

I'm testing jison with a naked postgresql-13.3 grammar generated by a modifed bison (see https://github.com/mingodad/lalr-parser-test) the naked grammar is parsed properly by bison and byacc see attached grammar
gram.y.naked.zip

The output:

$./node dist/cli-cjs-es5.js gram.y.naked
dist/cli-cjs-es5.js:19824
                throw err;
                ^

JisonParserError: 
You cannot specify a precedence override for an epsilon (a.k.a. empty) rule!
    
  Erroneous area:


    at Object.parseError (dist/cli-cjs-es5.js:14994:19)
    at Object.yyError (dist/cli-cjs-es5.js:15133:29)
    at Object.parser__PerformAction (dist/cli-cjs-es5.js:14637:34)
    at Object.parse (dist/cli-cjs-es5.js:16127:48)
    at Object.parse (dist/cli-cjs-es5.js:18717:23)
    at autodetectAndConvertToJSONformat (dist/cli-cjs-es5.js:19799:36)
    at new Jison_Generator (dist/cli-cjs-es5.js:25327:15)
    at Object.generateParserString (dist/cli-cjs-es5.js:25836:25)
    at processInputFile (dist/cli-cjs-es5.js:25751:30)
    at Object.cliMain [as main] (dist/cli-cjs-es5.js:25829:13)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions