ParsingAPI

Apache NetBeans Wiki Index

Note: These pages are being reviewed.

Motivation

NetBeans IDE is no longer just Java IDE. We support many various languages: Java, Ruby, PHP, JSP, Javascript and so on. Each language support module implements its own parsing framework. We have Retouche for Java, GSF for Ruby, Schliemann. Now is the right time to consiladate those framworks in order to avoid code duplication, improve performance, solve threading issues, consolidate features and allow language embedding.

Description

We want to create Parsing API to:

  • Unify registration of parsers

  • Allow language embedding

  • Allow file indexing

  • Unify threading, starting/canceling parser tasks

  • Avoid code duplication

  • Simplify implementation of language supports

Current Status

Plugin Go/No Go Status

CSS

Done.

Groovy

Done, bugfixing.

GSP

Done, bugfixing.

HTML

Done, bugfixing.

Javascript

Done, bugfixing.

JSP

Done, bugfixing.

PHP

Done, bugfixing.

Python

In progress.

RHTML

Done, bugfixing.

Ruby

Done, bugfixing.

YAML

Done, bugfixing.

JavaFX

Done

Ada

Done, bugfixing. (contrib)

EJS

Not planned for 6.7 (contrib)

Erlang

Rewrite done (?) — Status

Fortress

Not planned for 6.7 (contrib)

Scala

Done, bugfixing. (contrib)

Tcl/Tk

Not planned for 6.7 (contrib)

Impacts

Architecture

API

We have experience with Retouche, GSF and Schliemann and we want to make an API, which will rise from our experience with those frameworks. The API is not intend to be revolutionary. It is evolutionary development.

The API will have several parts:

  1. Parsing

    • Defines registration of parsers

    • Defines threading

    • Concept of Virtual Source (support for language embedding)

    • No support for phases

    • No ordering of parsers

      1. Indexing

    • Provides scanning infrastructure

    • Allows registration of Index providers

    • RepositoryUpdater - listening on file and document changes

      1. "Generic ClassPath"

    • Provides something like ClassPath to specify source roots (folders, archives)

      1. UserAction and Modification tasks

    • Change represented by ModificationResult (in fact textual diff)

    • Need source position translators for embedded languages

Documentation

API must be well documented. Developer documentation is a must.

Testing

  • Unit testing.

  • Functional testing through language support modules.

Performance

  • Well defined threading and starting/canceling parser tasks could improve performance of code completion and features in various Editors

  • Startup scanning will be slower because of scanning and indexing not only Java, but possibly all files

Tasks

We have been tracking all tasks related to Parsing API in IssueZilla under Editor / Parsing & Indexing category. Please use the following query to see all unresolved issues sorted by their priority.

Additional information

The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.

This page was exported from http://wiki.netbeans.org/ParsingAPI , that was last modified by NetBeans user Mr lou d on 2015-01-08T09:23:40Z.

This document was automatically converted to the AsciiDoc format on 2020-03-12, and needs to be reviewed.