-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotes.txt
20 lines (14 loc) · 809 Bytes
/
Notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
parsing is a solved problem;
parser generators generate parsers for specific languages from specified inputs,
most commonly CGF (context free grammar) as their inputs, which is a set of rules that
describe how to form correct sentences in a language. Most common formats, Backus-Naur Form (BNF),
or Extended Backus-Naur Form (EBNF)
PrimaryExpression ::="this"
|ObjectLiteral
|("("Expression")")
............ Example of EcmaScript syntax in BNF
parsers Yacc/bison for c-based languages, ANTLR (another tool for language recognition) for java C# python +
top-down parsing :recursive descent parsing, early parsing, predictive parsing
bottom-up parsing
parser for Monkeylang => recursive descent parser, "top down operator precednce" refered to as Pratt parser
after Vaughan Pratt