slides
Transcription
slides
Noncanonical Parsing Sylvain Schmitz schmitz@i3s.unice.fr 10 mai 2006 Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires 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) { // ... } } Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires 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éminaires 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éminaires 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éminaires 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éminaires 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éminaires 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éminaires 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éminaires 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éminaires 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éminaires 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éminaires 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éminaires 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éminaires 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éminaires 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éminaires 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éminaires doctorants 3 3 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS public final static int FIELD = 10 ; $ k public final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS ε |= reduce public final static int FIELD = 10 ; $ε k public final static int FIELD = 10;$ $<FModS > k public final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS ε public final static int FIELD = 10 ; $ <FModS > k public final static int FIELD = 10;$ |= $ <FModS > public k final static int FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FMod ε public |= reduce final static int FIELD = 10 ; $ <FModS > public k final static int FIELD = 10;$ $ <FModS > <FMod > k final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FMod ε public |= reduce final static int FIELD = 10 ; $<FModS ><FMod > k final static int FIELD = 10;$ $<FModS > k final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FMod ε public final static int FIELD = 10 ; $ <FModS > k final static int FIELD = 10;$ |= $ <FModS > final k static int FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FMod ε public |= reduce FMod final static int FIELD = 10 ; $ <FModS > final k static int FIELD = 10;$ $ <FModS > <FMod > k static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FModS FMod ε public |= reduce FMod final static int FIELD = 10 ; $<FModS ><FMod > k static int FIELD = 10;$ $<FModS > k static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FModS FMod ε public FMod final static int FIELD = 10 ; $ <FModS > k static int FIELD = 10;$ |= $ <FModS > static k int FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FModS FMod ε public |= reduce FMod FMod final static int FIELD = 10 ; $ <FModS > static k int FIELD = 10;$ $ <FModS > <FMod > k int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FModS FModS FMod ε public |= reduce FMod FMod final static int FIELD = 10 ; $<FModS ><FMod > k int FIELD = 10;$ $<FModS > k int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FModS FModS FMod ε public FMod FMod final static int FIELD = 10 ; $ <FModS > k int FIELD = 10;$ |= $ <FModS > int k FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FModS FModS FMod ε public |= reduce FMod NonVoidType FMod final static int FIELD = 10 ; $ <FModS > int k FIELD = 10;$ $ <FModS > <NonVoidType > k FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FModS FModS FMod ε public |= reduce Type FMod NonVoidType FMod final static int FIELD = 10 ; $ <FModS > <NonVoidType > k FIELD = 10;$ $ <FModS > <Type > k FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FModS FModS FMod ε public |= reduce Type VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ <FModS ><Type > FIELD = 10 k ;$ $ <FModS ><Type > <VDeclS > k ;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FModS FModS FModS FModS FMod ε public Type VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ <FModS ><Type ><VDeclS > k ; $ |= $ <FModS ><Type ><VDeclS > ; k $ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FDecl FModS FModS FModS FModS FMod ε public |= reduce Type VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $<FModS ><Type ><VDeclS > ; k $ $<FDecl > k $ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Parsing Java Declarations Example FDecl FModS FModS FModS FModS FMod ε public Type VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ <FDecl > k $ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 4 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS public final static int FIELD = 10 ; $ k public final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS ε |= reduce public final static int FIELD = 10 ; $ε k public final static int FIELD = 10;$ $<MModS > k public final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS ε public final static int FIELD = 10 ; $ <MModS > k public final static int FIELD = 10;$ |= $ <MModS > public k final static int FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS FMod ε public |= reduce final static int FIELD = 10 ; $ <MModS > public k final static int FIELD = 10;$ $ <MModS > <FMod > k final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example error! MModS FMod ε public final static int FIELD = 10 ; $ <MModS ><FMod > k final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MMod ε public |= reduce final static int FIELD = 10 ; $ <MModS > public k final static int FIELD = 10;$ $ <MModS > <MMod > k final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MMod ε public |= reduce final static int FIELD = 10 ; $<MModS ><MMod > k final static int FIELD = 10;$ $<MModS > k final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MMod ε public final static int FIELD = 10 ; $ <MModS > k final static int FIELD = 10;$ |= $ <MModS > final k static int FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MMod ε public |= reduce MMod final static int FIELD = 10 ; $ <MModS > final k static int FIELD = 10;$ $ <MModS > <MMod > k static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MModS MMod ε public |= reduce MMod final static int FIELD = 10 ; $<MModS ><MMod > k static int FIELD = 10;$ $<MModS > k static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MModS MMod ε public MMod final static int FIELD = 10 ; $ <MModS > k static int FIELD = 10;$ |= $ <MModS > static k int FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MModS MMod ε public |= reduce MMod MMod final static int FIELD = 10 ; $ <MModS > static k int FIELD = 10;$ $ <MModS > <MMod > k int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MModS MModS MMod ε public |= reduce MMod MMod final static int FIELD = 10 ; $<MModS ><MMod > k int FIELD = 10;$ $<MModS > k int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MModS MModS MMod ε public MMod MMod final static int FIELD = 10 ; $ <MModS > k int FIELD = 10;$ |= $ <MModS > int k FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MModS MModS MMod ε public |= reduce MMod NonVoidType MMod final static int FIELD = 10 ; $ <MModS > int k FIELD = 10;$ $ <MModS > <NonVoidType > k FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MModS MModS MMod ε public |= reduce ResType MMod NonVoidType MMod final static int FIELD = 10 ; $ <MModS > <NonVoidType > k FIELD = 10;$ $ <MModS > <ResType > k FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MModS MModS MMod ε public ResType MMod NonVoidType MMod final static int FIELD = 10 ; $ <MModS ><ResType > k FIELD = 10;$ |= $ <MModS ><ResType > FIELD k = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MModS MModS MMod ε public ResType MMod NonVoidType MMod final static int FIELD = 10 ; $ <MModS ><ResType > FIELD k = 10;$ |= $ <MModS ><ResType > FIELD = k 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example MModS MModS MModS MModS MMod ε public ResType MMod NonVoidType MMod error! final static int FIELD = 10 ; $ <MModS ><ResType > FIELD = k 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Bottom-Up Parsing Parsing Java Nondeterminism Example FModS ε |= reduce public final static int FIELD = 10 ; $ε k public final static int FIELD = 10;$ $<FModS > k public final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 5 / 18 Deterministic Parsing Why Determinism Matters Why Determinism Matters + Performance + Safety − Generality Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 6 / 18 Deterministic Parsing Deterministic Techniques LR(k) Parsing Knuth [1965] I I complete stack information k symbols of lookahead Example Choice between reductions <FModS > →ε and <MModS > →ε: kpublic static final . . . final static int l = kpublic static final . . . final static int l ( I Infinite lookahead needed for better generality Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 7 / 18 Deterministic Parsing Deterministic Techniques LR(k) Parsing Knuth [1965] I I complete stack information k symbols of lookahead Example Choice between reductions <FModS > →ε and <MModS > →ε: kpublic static final . . . final static int l = kpublic static final . . . final static int l ( I Infinite lookahead needed for better generality Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 7 / 18 Deterministic Parsing Deterministic Techniques LR(k) Parsing Knuth [1965] I I complete stack information k symbols of lookahead Example Choice between reductions <FModS > →ε and <MModS > →ε: kpublic static final . . . final static int l = kpublic static final . . . final static int l ( I Infinite lookahead needed for better generality Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 7 / 18 Deterministic Parsing Deterministic Techniques Syntactic Predicates Parr and Quong [1995] I User defined lookahead pattern Example ((MMod)* ResType MDecl)? I Error-prone I Exponential time complexity Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 9 / 18 Deterministic Parsing Deterministic Techniques Syntactic Predicates Parr and Quong [1995] I User defined lookahead pattern Example ((MMod)* ResType MDecl)? I Error-prone I Exponential time complexity Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 9 / 18 Deterministic Parsing Deterministic Techniques Syntactic Predicates Parr and Quong [1995] I User defined lookahead pattern Example ((MMod)* ResType MDecl)? I Error-prone I Exponential time complexity Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 9 / 18 Deterministic Parsing Deterministic Techniques Syntactic Predicates Parr and Quong [1995] I User defined lookahead pattern Example ((MMod)* ResType MDecl)? I Error-prone I Exponential time complexity Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 9 / 18 Deterministic Parsing Deterministic Techniques LR-Regular Parsing Baker [1981], Bermudez and Schimpf [1990], Farré and Fortes Gálvez [2001] I Finite State lookahead discrimination I O(n2 ) time complexity I Only considers terminal symbols Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 10 / 18 Deterministic Parsing Deterministic Techniques LR-Regular Parsing Baker [1981], Bermudez and Schimpf [1990], Farré and Fortes Gálvez [2001] I Finite State lookahead discrimination Example abstract void int ( MModS = , ; FModS IDENT public static ... transient I O(n2 ) time complexity I Only considers terminal symbols Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 10 / 18 Deterministic Parsing Deterministic Techniques LR-Regular Parsing Baker [1981], Bermudez and Schimpf [1990], Farré and Fortes Gálvez [2001] I Finite State lookahead discrimination Example abstract void int ( MModS = , ; FModS IDENT public static ... transient I O(n2 ) time complexity I Only considers terminal symbols Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 10 / 18 Deterministic Parsing Deterministic Techniques LR-Regular Parsing Baker [1981], Bermudez and Schimpf [1990], Farré and Fortes Gálvez [2001] I Finite State lookahead discrimination Example abstract void int ( MModS = , ; FModS IDENT public static ... transient I O(n2 ) time complexity I Only considers terminal symbols Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 10 / 18 Noncanonical Parsing Why Noncanonical Parsing? Parsing a Program Source I Good generality I Determinism I O(n) time complexity Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 11 / 18 Noncanonical Parsing Why Noncanonical Parsing? Parsing a Program Source I Good generality I Determinism I O(n) time complexity Noncanonical parsing Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 11 / 18 Noncanonical Parsing Parsing Example Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FModS public final static int FIELD = 10 ; $ k public final static int FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Noncanonical Parsing Parsing Example Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FModS public final static int FIELD = 10 ; $ k public final static int FIELD = 10;$ |= $ public k final static int FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Noncanonical Parsing Parsing Example Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FModS public final static int FIELD = 10 ; $public k final static int FIELD = 10;$ |= $public final k static int FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Noncanonical Parsing Parsing Example Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FModS public final static int FIELD = 10 ; $public final k static int FIELD = 10;$ |= $public final static k int FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Noncanonical Parsing Parsing Example Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FModS public final static int FIELD = 10 ; $public final static k int FIELD = 10;$ |= $public final static int k FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Noncanonical Parsing Parsing Example Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example NonVoidType FModS public |= reduce final static int FIELD = 10 ; $public final static int k FIELD = 10;$ $public final static k <NonVoidType > FIELD = 10;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Noncanonical Parsing Parsing Example Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example NonVoidType FModS public final static int ; FIELD = 10 $public final static k <NonVoidType > FIELD = 10;$ |= $public final static <NonVoidType > k FIELD = 10;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Noncanonical Parsing Parsing Example Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example NonVoidType FModS public final static int ; FIELD = 10 $public final static <NonVoidType > k FIELD = 10 ;$ |= $public final static <NonVoidType > FIELD = 10 k ;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Noncanonical Parsing Parsing Example Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example VDeclS NonVoidType FModS public |= reduce final static int FIELD = 10 ; $public final static <NonVoidType > FIELD = 10 k ;$ $public final static <NonVoidType > k <VDeclS > ;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Noncanonical Parsing Parsing Example Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type VDeclS NonVoidType FModS public |= reduce final static int ; FIELD = 10 $public final static <NonVoidType > k <VDeclS > ;$ $public final static k <Type > <VDeclS > ;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type VDeclS FMod NonVoidType FModS public |= reduce final static int FIELD = 10 ; $public final static k <Type ><VDeclS > ;$ $public final k <FMod > <Type ><VDeclS > ;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type VDeclS FMod NonVoidType FMod FModS public |= reduce final static int FIELD = 10 ; $public final k <FMod ><Type ><VDeclS > ;$ $public k <FMod > <FMod ><Type ><VDeclS > ;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type VDeclS FMod NonVoidType FMod FModS FMod public |= reduce final static int ; FIELD = 10 $ public k <FMod ><FMod ><Type ><VDeclS > ;$ $ k <FMod > <FMod ><FMod ><Type ><VDeclS > ;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type VDeclS FMod NonVoidType FMod FModS FMod ε public |= reduce final static int FIELD = 10 ; $ ε k <FMod ><FMod ><FMod ><Type ><VDeclS > ;$ $ k <FModS > <FMod ><FMod ><FMod ><Type ><VDeclS > Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type VDeclS FMod NonVoidType FMod FModS FMod ε public final static int FIELD = 10 ; $ k <FModS > <FMod ><FMod ><FMod ><Type ><VDeclS > |= $ <FModS > k <FMod ><FMod ><FMod ><Type ><VDeclS > shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type VDeclS FMod NonVoidType FMod FModS FMod ε public final static int FIELD = 10 ; $ <FModS > k <FMod > <FMod ><FMod ><Type ><VDeclS |= $ <FModS > <FMod > k <FMod ><FMod ><Type ><VDeclS shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type VDeclS FMod NonVoidType FModS FModS FMod ε public |= reduce FMod final static int FIELD = 10 ; $ <FModS ><FMod > k <FMod ><FMod ><Type ><VDeclS > $ k <FModS > <FMod ><FMod ><Type ><VDeclS > ;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type VDeclS FMod NonVoidType FModS FModS FMod ε public FMod final static int ; FIELD = 10 $ k <FModS > <FMod ><FMod ><Type ><VDeclS > ;$ |= $ <FModS > k <FMod ><FMod ><Type ><VDeclS > ;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type VDeclS FMod NonVoidType FModS FModS FMod ε public FMod final static int ; FIELD = 10 $ <FModS > k <FMod > <FMod ><Type ><VDeclS > ;$ |= $ <FModS > <FMod > k <FMod ><Type ><VDeclS > ;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type FModS FModS FModS FMod ε public |= reduce VDeclS FMod NonVoidType FMod final static int ; FIELD = 10 $ <FModS ><FMod > k <FMod ><Type ><VDeclS > ;$ $ k <FModS > <FMod ><Type ><VDeclS > ;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type FModS FModS FModS FMod ε public VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ k <FModS > <FMod ><Type ><VDeclS > ;$ |= $ <FModS > k <FMod ><Type ><VDeclS > ;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example Type FModS FModS FModS FMod ε public VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ <FModS > k <FMod > <Type ><VDeclS > ;$ |= $ <FModS > <FMod > k <Type ><VDeclS > ;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FModS FModS FModS FModS FMod ε public |= reduce Type VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ <FModS ><FMod > k <Type ><VDeclS > ;$ $ k <FModS > <Type ><VDeclS > ;$ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FModS FModS FModS FModS FMod ε public Type VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ k <FModS > <Type ><VDeclS > ;$ |= $ <FModS > k <Type ><VDeclS > ;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FModS FModS FModS FModS FMod ε public Type VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ <FModS > k <Type > <VDeclS > ;$ |= $ <FModS > <Type > k <VDeclS > ;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FModS FModS FModS FModS FMod ε public Type VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ <FModS ><Type > k <VDeclS > ;$ |= $ <FModS ><Type > <VDeclS > k ;$ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FModS FModS FModS FModS FMod ε public Type VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ <FModS ><Type ><VDeclS > k ; $ |= $ <FModS ><Type ><VDeclS > ; k $ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FDecl FModS FModS FModS FModS FMod ε public |= reduce Type VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ <FModS ><Type ><VDeclS > ; k $ $ k <FDecl > $ Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Parsing Example Noncanonical Parsing Noncanonical Parsing Colmerauer [1970], Szymanski and Williams [1976], Tai [1979] Example FDecl FModS FModS FModS FModS FMod ε public Type VDeclS FMod NonVoidType FMod final static int FIELD = 10 ; $ k <FDecl > $ |= $ <FDecl > k $ shift Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 12 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Example FModS FDecl FModS ε ; transient Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Example FModS FModS FDecl FMod ε ; transient Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Example FModS FModS FMod ε public FDecl ; transient Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Example FModS FModS FMod ε public final FDecl ; transient Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Example FModS FModS FMod ε public final static transient Sylvain Schmitz (Laboratoire I3S) FDecl Noncanonical Parsing ; Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Example FModS FModS FMod ε public final static transient Sylvain Schmitz (Laboratoire I3S) FDecl Noncanonical Parsing ; Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Example FModS FDecl FModS ε ; transient Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Example FDecl FModS Type VDeclS ε ; transient Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Example FDecl FModS Type VDeclS NonVoidType ε ; transient Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Example FDecl FModS Type VDeclS NonVoidType ε int ; transient Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Notation <FModS > → ε Sylvain Schmitz (Laboratoire I3S) {public, final, static, int, transient, <FMod >, <Type >, <NonVoidType >} Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Comparison <FModS > → ε {public, final, static, int, transient, <FMod >, <Type >, <NonVoidType >} <MModS > → ε {public, final, static, int, abstract, <MMod >, <ReturnType >, <NonVoidType >} Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Conflicts <FModS > → ε {public, final, static, int, transient, <FMod >, <Type >, <NonVoidType >} <MModS > → ε {public, final, static, int, abstract, <MMod >, <ReturnType >, <NonVoidType >} Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical Lookaheads Decisions <FModS > → ε {public, final, static, int, transient, <FMod >, <Type >, <NonVoidType >} <MModS > → ε {public, final, static, int, abstract, <MMod >, <ReturnType >, <NonVoidType >} Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 13 / 18 Noncanonical Parsing Noncanonical Parsers Generation Noncanonical LALR(1) Schmitz [2006] NLALR(1) Construction I Easy: computations on the LR(0) automaton I Fast: relational expressions Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 14 / 18 End Comments Closing Comments Noncanonical Parsing Good generality, Determinism, O(n) time complexity Improvements Better generality: no preset lookahead length Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 15 / 18 End Comments T. P. Baker. Extending lookahead for LR parsers. J. Comput. Syst. Sci., 22(2):243–259, 1981. doi: 10.1016/0022-0000(81)90030-1. M. E. Bermudez and K. M. Schimpf. Practical arbitrary lookahead LR parsing. J. Comput. Syst. Sci., 41(2): 230–250, 1990. doi: 10.1016/0022-0000(90)90037-L. A. Colmerauer. Total precedence relations. J. ACM, 17 (1):14–30, Jan. 1970. doi: 10.1145/321556.321559. J. Farré and J. Fortes Gálvez. A bounded-connect construction for LR-regular parsers. In R. Wilhelm, editor, CC’01, volume 2027 of Lecture Notes in Computer Science, pages 244–258. Springer, 2001. URL http://www.springerlink.com/link.asp? id=e3e8g77kxevkyjfd. Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 16 / 18 End Comments J. Gosling, B. Joy, and G. Steele. The JavaTM Language Specification. Addison-Wesley Longman Publishing Co., Inc., first edition, Aug. 1996. ISBN 0-201-63451-1. URL http://java.sun.com/docs/books/jls/. D. E. Knuth. On the translation of languages from left to right. Information and Control, 8:607–639, 1965. T. J. Parr and R. W. Quong. ANTLR: A predicated-LL(k) parser generator. Software, Practice and Experience, 25(7):789–810, 1995. ISSN 0038-0644. URL http://citeseer.nj.nec.com/12770. Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 17 / 18 End Comments S. Schmitz. Noncanonical LALR(1) parsing. In Z. Dang and O. H. Ibarra, editors, DLT’06, volume 4036 of Lecture Notes in Computer Science, pages 95–107. Springer, 2006. T. G. Szymanski and J. H. Williams. Noncanonical extensions of bottom-up parsing techniques. SIAM J. Comput., 5(2):231–250, June 1976. URL http://locus.siam.org/SICOMP/volume-05/ art 0205019.html. K.-C. Tai. Noncanonical SLR(1) grammars. ACM Trans. Prog. Lang. Syst., 1(2):295–320, 1979. ISSN 0164-0925. doi: 10.1145/357073.357083. Sylvain Schmitz (Laboratoire I3S) Noncanonical Parsing Séminaires doctorants 3 18 / 18
Similar documents
slides