Skip to content

Commit 7f8aa68

Browse files
authored
Merge pull request #19 from krupan/grammar-fixes
some grammar fixes for lesson 0
2 parents abaf978 + 79f7491 commit 7f8aa68

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tutorial/en/0-Preface.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
This series of articles is a tutorial of building a C compiler from scratch.
1+
This series of articles is a tutorial for building a C compiler from scratch.
22

33
I lied a little in the above sentence: it is actually an _interpreter_ instead
44
of _compiler_. I lied because what the hell is a "C interpreter"? You will
5-
however, understand compiler better by building an interpreter.
5+
however, understand compilers better by building an interpreter.
66

77
Yeah, I wish you can get a basic understanding of how a compiler is
88
constructed, and realize it is not that hard to build one. Good Luck!
@@ -11,7 +11,7 @@ Finally, this series is written in Chinese in the first place, feel free to
1111
correct me if you are confused by my English. And I would like it very much if
1212
you could teach me some "native" English :)
1313

14-
We won't write any code in this chapter, feel free to skip if you are
14+
We won't write any code in this chapter, feel free to skip it if you are
1515
desperate to see some code...
1616

1717
## Why you should care about compiler theory?
@@ -20,10 +20,10 @@ Because it is **COOL**!
2020

2121
And it is very useful. Programs are built to do something for us, when they
2222
are used to translate some forms of data into another form, we can call them
23-
compiler. Thus by learning some compiler theory we are trying to master a very
23+
a compiler. Thus by learning some compiler theory we are trying to master a very
2424
powerful technique of solving problems. Isn't that cool enough to you?
2525

26-
People used to say understanding how compiler works would help you to write
26+
People used to say understanding how a compiler works would help you to write
2727
better code. Some would argue that modern compilers are so good at
2828
optimization that you should not care any more. Well, that's true, most people
2929
don't need to learn compiler theory only to improve the efficency of the code.
@@ -34,7 +34,7 @@ And by most people, I mean you!
3434
I have always been in awe of compiler theory because that's what makes
3535
programing easy. Anyway can you imaging building a web browser in only
3636
assembly language? So when I got a chance to learn compiler theory in college,
37-
I was so exciting! And then... I quit, not understanding what that it.
37+
I was so excited! And then... I quit, not understanding what that it.
3838

3939
Normally a course of compiler will cover:
4040

@@ -46,21 +46,21 @@ Normally a course of compiler will cover:
4646
5. Code generation.
4747
6. Code optimization.
4848

49-
Perhaps more than 90% students will not care anything beyond parser, and
50-
what's more, we still don't know how to build a compiler! Even after all these
51-
efforts learning the theories. Well the main reason is that what "Compiler
49+
Perhaps more than 90% students will not care anything beyond the parser, and
50+
what's more, we still don't know how to build a compiler! Even after all the
51+
effort learning the theories. Well the main reason is that what "Compiler
5252
Thoery" trys to teach is "How to build a parser generator", namely a tool that
5353
consumes syntax gramer and generates a compiler for you. lex/yacc or
5454
flex/bison or things like that.
5555

56-
These theories try to taught us how to solve a general problems of generating
57-
compilers automatically. That means once you've master them, you are able to
56+
These theories try to teach us how to solve the general problems of generating
57+
compilers automatically. That means once you've mastered them, you are able to
5858
deal with all kinds of grammars. They are indeed useful in industry.
59-
Nevertheless they are too powerful and too complicate for students and most
59+
Nevertheless they are too powerful and too complicated for students and most
6060
programmers. You will understand that if you try to read lex/yacc's source
6161
code.
6262

63-
Good news is building a compiler can be much simpler than you'd ever imagined.
63+
Good news is building a compiler can be much simpler than you ever imagined.
6464
I won't lie, not easy, but definitely not hard.
6565

6666
## Birth of this project

0 commit comments

Comments
 (0)