From 6c73a13855d76ed32c067564beee9d474f0d7bc1 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Mon, 24 Oct 2022 23:29:49 +0300 Subject: Fixed too large slide --- website/content/slides/03_parsing/_index.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/website/content/slides/03_parsing/_index.md b/website/content/slides/03_parsing/_index.md index 7fccdcc..0b7877c 100644 --- a/website/content/slides/03_parsing/_index.md +++ b/website/content/slides/03_parsing/_index.md @@ -35,9 +35,12 @@ Context Free Grammars are: 1. formal grammars - they describe all the strings in a formal language 2. context free - there is only one non-terminal on left hand side of each rule - ::= | () | - ::= + | - | * | / - ::= [0-9]+ +--- +##### CFG for arithmetic expressions + + ::= | () | + ::= + | - | * | / + ::= [0-9]+ > Does this grammar allow for operator precedence? (No, more later) @@ -306,7 +309,7 @@ exactly the same in terms of algorithms and power. {{< note >}} -- First three are easy to implement by hand, the second three are better +- First three are easy to implement by hand, the last three are better generated. - Pratt parsing is a mix between recursive descent and operator-precedence. -- cgit v1.3.1-23-gd82d