Formal Grammar for Java

نویسندگان

  • Jim Alves-Foss
  • Deborah A. Frincke
چکیده

This chapter presents an attribute grammar for the Java programming language (v. 1.1). This grammar is derived from the LALR grammar presented in the Java Language Speci cation (JLS) [1]. The purpose of this grammar is to formally specify not only the syntactic structure of Java programs, but also their static semantics. Speci cally, in this chapter we try to formally capture all aspects of the language that would result in compile-time errors. These errors include, but are not limited to:

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Translating Formal Software Specifications to Natural Language A Grammar-Based Approach

We describe a system for automatically translating formal software specifications to natural language. The system produces natural language which is acceptable to a human reader, and it supports byhand optimization by users who are not experts of our system. The translation system is implemented using the Grammatical Framework, a grammar formalism based on Martin-Löf’s type theory. We show that...

متن کامل

Parsing Expression Grammar as a Primitive Recursive-Descent Parser with Backtracking

Two recent developments in the field of formal languages are Parsing Expression Grammar (PEG) and packrat parsing. The PEG formalism is similar to BNF, but defines syntax in terms of recognizing strings, rather than constructing them. It is, in fact, precise specification of a backtracking recursivedescent parser. Packrat parsing is a general method to handle backtracking in recursive-descent p...

متن کامل

Evaluation of recent speech grammar standardization efforts

The “Voice Browser “ activity within the W3C consortium addresses the need for standards for speech grammars, dialogue descriptions etc. in distributed systems. This paper discusses the consortium’s recent speech grammar working draft specification. The W3C specification is based on the Java Speech Grammar Format (JSGF) defined by Sun Microsystems and is with all good and bad qualities characte...

متن کامل

Thesis for the Degree of Doctor of Philosophy Formal and Informal Software Specifications

The topic of this thesis is to bridge the gap between formal and informal software specifications. Formal specifications are required for the use of formal methods to verify the correctness of software. If we expect formal methods to be used in realistic software development projects, we need to enable people with varying levels of familiarity with formal specification languages to understand, ...

متن کامل

Teaching Logic to Linguists: the Logical Approach to Grammar

Natural Language Grammar can be viewed as a formal system in many aspects. The traditional way of presenting grammar to students as a set of morphosyntactic rules in order to speak a language correctly can be substituted profitably by formal models that explain the interfaces between morphology, syntax and semantics and even pragmatics. These models are based in most cases in logical models. Th...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999