Movatterモバイル変換


[0]ホーム

URL:


Wayback Machine
446 captures
31 Jul 2008 - 02 Jun 2025
AprJUNJul
Previous capture06Next capture
202120222023
success
fail
COLLECTED BY
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20220606190103/http://openjdk.java.net/projects/compiler-grammar/

Compiler Grammar

Introduction

The goal of this Project is to develop an experimental versionof the javac compiler based upon agrammarwritten inANTLR.

The parser that is currently in the javac compiler is ahand-written LALR parser. It is somewhat fragile, and is not alwayseasy to extend when working on potential new language features. Inaddition, it is not well-suited for analysis, such as comparisonagainst the grammar rules in the Java Language Specification(JLS).

There is a separate but related problem with JLS. The JLSactually contains two slightly different grammars. One is the"exposition grammar" used through the body of the book in chapters1-17; the other is the "reference grammar" in chapter 18,supposedly suitable as the basis for an implementation. They aredifferent in a number of places, and neither match exactly what isdone in the javac compiler itself. Thus, a subsidiary goal is tounderstand the differences between these three formulations, withthe possibility of aligning them, and being able to formally testthe result.

Status

The project is available in the Mercurial repositories at:

Within that forest, all the changes to the javac compiler are inthelangtools repository.

The original Java.g ANTLR grammar has been integrated into thejavac compiler. The resulting compiler passes all the compilerregression tests and all the relevant JCK tests for a Javacompiler. The grammar has also been marked up with comments so thatit is possible to strip out those parts that are specific to javac(such as building javac AST nodes) leaving a grammar which can beused within tools likeANTLRWorks.

For More Information ...

Community

This Project is sponsored by theCompiler Group.

OpenJDK logo
Installing
Contributing
Sponsoring
Developers' Guide
Vulnerabilities
JDK GA/EA Builds
Mailing lists
Wiki ·IRC
Bylaws ·Census
Legal
JEP Process
Source code
Mercurial
GitHub
Tools
Mercurial
Git
jtreg harness
Groups
(overview)
Adoption
Build
Client Libraries
Compatibility & Specification Review
Compiler
Conformance
Core Libraries
Governing Board
HotSpot
IDE Tooling & Support
Internationalization
JMX
Members
Networking
Porters
Quality
Security
Serviceability
Vulnerability
Web
Projects
(overview)
Amber
Annotations Pipeline 2.0
Audio Engine
Build Infrastructure
CRaC
Caciocavallo
Closures
Code Tools
Coin
Common VM Interface
Compiler Grammar
Detroit
Developers' Guide
Device I/O
Duke
Font Scaler
Framebuffer Toolkit
Graal
Graphics Rasterizer
HarfBuzz Integration
IcedTea
JDK 6
JDK 7
JDK 7 Updates
JDK 8
JDK 8 Updates
JDK 9
JDK (…17,18,19)
JDK Updates
JavaDoc.Next
Jigsaw
Kona
Kulla
Lambda
Lanai
Leyden
Lilliput
Locale Enhancement
Loom
Memory Model Update
Metropolis
Mission Control
Modules
Multi-Language VM
Nashorn
New I/O
OpenJFX
Panama
Penrose
Port: AArch32
Port: AArch64
Port: BSD
Port: Haiku
Port: Mac OS X
Port: MIPS
Port: Mobile
Port: PowerPC/AIX
Port: RISC-V
Port: s390x
Portola
SCTP
Shenandoah
Skara
Sumatra
ThreeTen
Tiered Attribution
Tsan
Type Annotations
XRender Pipeline
Valhalla
Verona
VisualVM
Wakefield
Zero
ZGC
Oracle logo
© 2022 Oracle Corporation and/or its affiliates
Terms of Use · License:GPLv2 ·Privacy ·Trademarks

[8]ページ先頭

©2009-2025 Movatter.jp