Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse configuration file #18

Closed
7 tasks done
S0YKIM opened this issue Oct 9, 2022 · 0 comments · Fixed by #35
Closed
7 tasks done

Parse configuration file #18

S0YKIM opened this issue Oct 9, 2022 · 0 comments · Fixed by #35
Assignees
Labels
feature New feature or request

Comments

@S0YKIM
Copy link
Collaborator

S0YKIM commented Oct 9, 2022

  • 샘플 config 파일 생성
  • 띄어쓰기, 줄바꿈(\n), 탭(\t) 기준으로 토큰 나누기
  • Server 블록 파싱
  • Location 블록 파싱
  • 유효성 검사(값이 단 하나여야 하는데 여러 개면 에러)
  • host, port 파싱하여 저장(예: 0.0.0.0:80)
  • getter 구현(찾는 값이 없으면 부모의 지시자 탐색)
@S0YKIM S0YKIM added the feature New feature or request label Oct 9, 2022
@S0YKIM S0YKIM self-assigned this Oct 9, 2022
S0YKIM added a commit that referenced this issue Oct 13, 2022
Implement Config class
- Has server blocks as private member variables
- Read config file and start parsing into blocks

Implement Block class
- Has parent block and location blocks as private member variables
- Set directives map depeding on which type of block it is
- Parse server block or location block
- Get value of directives, which finds value from parent if there is no value
S0YKIM added a commit that referenced this issue Oct 14, 2022
- ex) listen 0.0.0.0:8000
- host: 0.0.0.0
- port: 8000
S0YKIM added a commit that referenced this issue Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant