
This lecture is nothing more than an intro to the section. The intro will show you what the section will be about.
Learn how metalanguage and BNF define programming language grammar, including non-terminals, terminals, precedence rules, and how to describe expressions and terms in context-free grammar.
A compiler translates high level language to machine code via lexical analysis, syntax analysis, semantic analysis, and intermediate code generation; an interpreter executes with tokens and a syntax tree.
Learn how lexical analysis tokenizes source code into tokens and maps them to types like integers and variables. The lexer uses whitespace to guide tokenization and builds a symbol table.
Demonstrate parser consumption of lexer tokens to build a syntax tree. Highlight the parser's reliance on the symbol table and its distinction from the interpreter's processing and running the code.
Explain how the parser generates a single parse tree for a program to avoid ambiguity, and show tracing of input using grammar rules with expression, term, factor, plus, and times.
Identify the input from a grammar and generate a parse tree by performing left-to-right derivations, describing non-terminals and terminals, and choosing viable alternatives to build a complete syntax tree.
Analyze how to generate a parse tree from a grammar by performing a derivation, identifying terminals and non-terminals, and tracing the syntax tree step by step.
Discover how to detect ambiguous versus unambiguous grammar, rewrite rules to remove ambiguity, and apply leftmost and rightmost derivations to an expression grammar in BNF using the gold bar.
This video shows you how to install the Gold Parser. Visit this link to download it http://www.goldparser.org/
In this lecture you will start writing your first line of your own programming language using BNF mate language provided by Gold parser
After this lecture you will be able to write the grammar for Expressions and how is it describe in most programming languages.
Learn variable declaration and assignment with the dollar-sign syntax, covering single and multiple variable declarators and the variable initializer.
The if statement here will be like most programming language but instead of else if I put elif
Study while and for loops in a programming language, including expressions, statements, and counter increments. Practice grammar testing with dollar-prefixed identifiers and increment forms such as postfix and prefix ++.
In this lecture I will define some of the known data types
Today lecture I'll do method declaration with single parameter and multi-parameter.
After declaring function we need to call them when ever we need them. So, today I try to show how to call them.
In this lecture I will show you how to write the grammar of the Array, but I will not do the implementation of it because it takes ages to do it. So, try it yourself.
Input function is our second build in function in our language which reads the input from the user. In this section we'll write only the grammar the implementation will be in the next section.
This tour it will be useful for you guys because I will show you how to download grammars of any existing programming language and you can see their syntax.
This is nothing more than a summary of the section. I'll discuss with you what we have done in the section.
this you can visit python.org to download the python shell. If you not familiar with it you feel free to use java , c# ,c++ or any other.
Build a Python-based interpreter that recognizes the print keyword and extracts string literals by tokenizing input and managing simple states.
After teaching the lexer how to recognize the print in this lecture I'll parse the print statement and show the result on screen.
Here I will show to run python file in many different way and how you can debug it using Visual Studio.
First w should make the lexer distinguish between the number and expression. So, if the lexer sees just number it will return number. On other hand if it sees number followed by +,-,*,or / it will return expression.
Learn how the parser recognizes a number versus an expression and prints tokens to the screen, using substring ranges to extract each part, and build a print helper for display.
In order to evaluate expression we need to use stack to push tokens into it and then pop them and parse each tokens, but this process takes ages to do. So, we will use a build in function in python we'll pass it the expression and it evaluate it and return the result.
We said that variable starts with ($) then name of the variable. This how we can recognize them.
We will store the value of the variable in symbol table. what is symbol table? symbol table is connect to lexer and parser. We store the value in it and when ever the variable's value needed we can retrieve the value.
Explore retrieving a variable’s value by assigning expressions to names in a symbol table, evaluating expressions, and printing results while debugging assignment and retrieval steps.
Learn how to assign the value of one variable to another, print variables, and debug tokenization in a simple language by exploring statements, parsing, and end-of-line tokens.
Introduce input handling by reading user input, storing it in a variable, and printing it, guided by the language's grammar, tokens, and parser.
In this lecture, you implement recognition of the if statement by teaching the lexer and parser to handle tokens like equal and double equal, parse the condition, and print results.
Parse an if statement condition using the parser, recognize tokens like if, then, equal equal, and compare numbers to determine the true branch execution.
To implement greater and less than we need to add any number or variable we see before adding greater or less than. How? we will sit a flag when ever lexer sees a number the flag will be 1. Next step is add the number before check if the next token is > or <. Then add the operator.
This course is all about Programming Languages how they work and the different between compiler and interpreter. We will write a basic grammar and then we'll interpret it. By the end of course student will be able to write his/her own and complete programming Language which can serves same features like other programming Languages in the market.
This course is pure computer science course. It is a beginner level for student who just start leaning about CS. Also, expert student can attend the course and any other student no matter what is his/her major can enroll. I am sure you will learn new things