Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1986

Enhance DdlParsers to provide access to parser 'scoring'

XMLWordPrintable

      Request enhancement to DdlParsers to allow client to obtain the highest scored parser, so that feedback can be obtained if the parser fails.

      My scenario:
      I am using the DdlParsers.parse method in my client to parse Teiid dialect DDL. The Teiid DDL has a problem which causes an exception to be thrown inside DdlParsers.parse. When the exception is thrown, parse advances to the next highest scored parser and tries again. In my case, the second parser 'succeeds' (no exception) but the only AstNodes created and returned are 'Unknown Statements'. I need a way to use the 'best' parser in my client - and get the parse exception that it throws.

      A possible solution would be to add another method in DdlParsers that returns the parserIds in order of best score. Then in my client I could implement DdlParsers.parseUsing and have full control over which parser to use and be able to handle the exceptions.

              dflorian@redhat.com Daniel Florian (Inactive)
              mdrillin1@redhat.com Mark Drilling (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: