The goal of lexical analysis 1 2 <Class, string> = token string -> [Lexical Analyzer] --------------> [Parser] The goal of lexical analysis is to partition the input string into lexemes, identify the token of each lexeme (the substring unit we want to identify) then give to parser. On other hand, first part about lexemes is to partition input to units, and second part about token is to define the class of each units.
Once in college, I regreted not spending much time on learning compiler so hard. However, the opportunity comes to me again. Software analysis is very important for my research field in PhD: Automatic Exploitation Generation. Compiler is the necessary concept for Software analysis such for static analysis or dynamic analysis, I would grab this chance to learn compiler from basics again. This series include the learning notes for the Stanford course on edx, and would start from Introduction to each parts of Lexical Analysis, Parsing, Semantic Analysis, Optimization, and Code Generation.
Docker has become a trend that every engineer would be familiar with, but most of the people would mistake docker for a kind of virtual machine. In this post, I would like to show the difference between container and virtual machine. Of course, I would like to help people to figure out how to play with docker in easier way.
Difference between Container and Virtual machine With the picture above, you should find the difference between virtual machine and container.
In this post, I would show the way to create static library and dynamic library and how they link to the executable files. I would not dig into the details of comparison, advantages, or disadvantages between static and dynamic library, please make sure you already have a whole picture before starting on this post.
Create static library First, create a source file without main function as our library. Attention, filename should start from lib so that compiler can identify it as library file.
I ran into the “Condition String” in weekly contest of LintCode and failed to solve it. After spending some time on it after the contest ended, I found that the first idea I came up with was wrong. Here comes my writeup.
Problem Description Here I would give the screenshot of challenge:
First solution [Fail] First, I tried to handle this problem with longest increase subarray. For example, in acec