Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Compiler_hw1_lexical_analyzer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
During summer vacation, Gitlab will be restart frequently. Use it carefully.
Show more breadcrumbs
lang0909
Compiler_hw1_lexical_analyzer
Commits
cd4ee101
Commit
cd4ee101
authored
Aug 29, 2019
by
lang0909
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
2e41bcee
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+43
-23
43 additions, 23 deletions
README.md
with
43 additions
and
23 deletions
README.md
+
43
−
23
View file @
cd4ee101
...
@@ -23,27 +23,47 @@ gcc lex.yy.c -lf -lfl
...
@@ -23,27 +23,47 @@ gcc lex.yy.c -lf -lfl
### TOKEN 종류
### TOKEN 종류
1.
Keywords
1.
Keywords
-
int double str if while return
-
int double str if while return
2.
Identifiers (ID)
2.
Identifiers (ID)
-
영문자 대소문자, 숫자, underscore(_)로만 이루어짐
-
영문자 대소문자, 숫자, underscore(_)로만 이루어짐
-
첫 글자는 반드시 대소문자, _만 가능
-
첫 글자는 반드시 대소문자, _만 가능
-
‘_’문자만으로 이루어질 수는 없음
-
‘_’문자만으로 이루어질 수는 없음
-
길이는 제한이 없으나 실제 구분은 첫 16자로 함
-
길이는 제한이 없으나 실제 구분은 첫 16자로 함
3.
INTEGER
3.
INTEGER
-
기본적으로 C 언어의 int 표기법을 따름 (십진수만 사용)
-
기본적으로 C 언어의 int 표기법을 따름 (십진수만 사용)
-
자리 수는 제한 없으나 값을 저장 시 최대 10자리만 저장(11자리 이상은 상위부분 절단)
-
자리 수는 제한 없으나 값을 저장 시 최대 10자리만 저장(11자리 이상은 상위부분 절단)
4.
DOUBLE
4.
DOUBLE
-
C 언어의 double constant 표기법을 따름
-
C 언어의 double constant 표기법을 따름
5.
STRING
5.
STRING
-
기본적으로 C 언어의 표기법을 따름
-
기본적으로 C 언어의 표기법을 따름
6.
Operators
6.
Operators
-
+ -
*
/
-
+ -
*
/
-
=
-
=
-
> >= < <= == !=
-
> >= < <= == !=
7.
기타 특수 문자들
7.
기타 특수 문자들
-
" , ( ) ; { }
-
" , ( ) ; { }
8.
Comments
8.
Comments
-
C언어의 주석을 따른다 ( /
* *
/ 와 // )
-
C언어의 주석을 따른다 ( /
* *
/ 와 // )
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment