1/23
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Why Learn Programming Language Concepts?
Logic Based Languages are on the rise in popularity
Learning how programming languages work helps when learning more languages in the future.
Lambdas are being used in imperative languages more.
Imperative vs Declarative
Imperative - Program tells the computer what to do and how to do it
Procedural Programming
Object-Oriented Programming
Declarative - Program describes the characteristics of a solution
Functional Programming
Logic Programming
What does REPL Stand For?
R: Read
E: Evaluate
P: Print
L: Loop
Interpreter vs Compiler
Interpreter: executes the program by reading and evaluating the code as it runs.
Compiler: translates the entire program into machine code and doesn’t run it.
Lexical Analyzer
extracts tokens/words from text. Removes whitespace and comments
Syntax Analyzer(Compiler)
builds tokens into language structures (parse trees) based on the rules.
Semantic Analyzer (Compiler)
checks if the structures built follow language rules
What parser does ANTLR generate and what does it stand for?
ALL (Adaptive LL), LL stands for Left to right, left most derivation.
Scanner
tokenizes the characters and strips whitespace
Parser
determines if the tokens follow syntaxical rules, splits into an AST
Semantic Analyzer(Interpreter)
evaluates the expression
Grammer
Defines what programs in the language are allowed to look like.
AST
They represent the meaningful structure of the program, rather than the original text.
Printer
The printer takes the AST and turns it back into a readable textual representation.
Evaluator
The evaluator actually runs the program.
Environment
An Env stores information about variables.
Bindings
A binding is the association of a value or type with a variable.
Lexical scoping
the binding of a variable to a value (or type) is based on the code syntax structure
Dynamic scoping
a variable's values/type depends on the flow of control through a program, not any static structure of where it is defined.