Noncanonical Parsing
Sylvain Schmitz
10 mai 2006
Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing S´eminaires doctorants 3 1 / 18
Context-Free Grammars The Java Programming Language
Java Declarations
Gosling et al. [1996]
Example
public class Declarations {
public final static int FIELD = 10;
public static int method (int i) {
// ...
}
}
<FDecl >→<FModS > <Type > <VDeclS >;
<FModS >→<FModS ><FMod >|ε
<FMod >→public |final |static |transient |. . .
<Type >→<NonVoidType >
<MHead >→<MModS ><ResType ><MDecl ><Throws >
<MModS >→<MModS ><MMod >|ε
<MMod >→public |final |static |abstract |. . .
<ResType >→<NonVoidType >|void
Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing S´eminaires doctorants 3 3 / 18
Context-Free Grammars The Java Programming Language
Java Grammar
Gosling et al. [1996]
Example
public class Declarations {
public final static int FIELD = 10;
public static int method (int i) {
// ...
}
}
<FDecl >→<FModS > <Type > <VDeclS >;
<FModS >→<FModS ><FMod >|ε
<FMod >→public |final |static |transient |. . .
<Type >→<NonVoidType >
<MHead >→<MModS ><ResType ><MDecl ><Throws >
<MModS >→<MModS ><MMod >|ε
<MMod >→public |final |static |abstract |. . .
<ResType >→<NonVoidType >|void
Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing S´eminaires doctorants 3 3 / 18
Context-Free Grammars The Java Programming Language
Java Grammar
Gosling et al. [1996]
Example
public class Declarations {
public final static int FIELD = 10;
public static int method (int i) {
// ...
}
}
<FDecl >→<FModS > <Type > <VDeclS >;
<FModS >→<FModS ><FMod >|ε
<FMod >→public |final |static |transient |. . .
<Type >→<NonVoidType >
<MHead >→<MModS ><ResType ><MDecl ><Throws >
<MModS >→<MModS ><MMod >|ε
<MMod >→public |final |static |abstract |. . .
<ResType >→<NonVoidType >|void
Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing S´eminaires doctorants 3 3 / 18
Context-Free Grammars The Java Programming Language
Java Grammar
Gosling et al. [1996]
Example
public class Declarations {
public final static int FIELD = 10;
public static int method (int i) {
// ...
}
}
<FDecl >→<FModS ><Type > <VDeclS >;
<FModS >→<FModS ><FMod >|ε
<FMod >→public |final |static |transient |. . .
<Type >→<NonVoidType >
<MHead >→<MModS ><ResType ><MDecl ><Throws >
<MModS >→<MModS ><MMod >|ε
<MMod >→public |final |static |abstract |. . .
<ResType >→<NonVoidType >|void
Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing S´eminaires doctorants 3 3 / 18
1 / 117 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans l'interface ou les textes ? Ou savez-vous comment améliorer l'interface utilisateur de StudyLib ? N'hésitez pas à envoyer vos suggestions. C'est très important pour nous!