diff --git a/1.md b/notes/1.md similarity index 100% rename from 1.md rename to notes/1.md diff --git a/2.md b/notes/2.md similarity index 97% rename from 2.md rename to notes/2.md index a57f4ad..75fa7f6 100644 --- a/2.md +++ b/notes/2.md @@ -117,4 +117,7 @@ main() { ### Handwork * Thompson's construction (RE -> NFA) -* Subset Construction(NFA -> DFA) \ No newline at end of file +* Subset Construction(NFA -> DFA) + + +DFA Optimization \ No newline at end of file diff --git a/notes/3.md b/notes/3.md new file mode 100644 index 0000000..3546e1a --- /dev/null +++ b/notes/3.md @@ -0,0 +1,23 @@ +# Syntax Analysis + + +## Context-Free Grammars (CFG) + +## Parse Tree + +A tree representation of the derivation + +parse tree has `terminals` at the leaves, `non-terminals` at the interior. + +An in-order traversal of the leaves is the original input. + +* leftmost derivation +* rightmost derivation + +### Ambiguity + +should be resolved + +for example: `A + B * C` should be resolved + + diff --git a/pdf/L3.pdf b/pdf/L3.pdf new file mode 100644 index 0000000..092967b Binary files /dev/null and b/pdf/L3.pdf differ diff --git a/pdf/P0.pdf b/pdf/P1.pdf similarity index 100% rename from pdf/P0.pdf rename to pdf/P1.pdf diff --git a/pdf/P2.pdf b/pdf/P2.pdf new file mode 100644 index 0000000..5637bd6 Binary files /dev/null and b/pdf/P2.pdf differ