https://github.com/oxtna/css-engine
Parsing a subset of CSS and querying data
https://github.com/oxtna/css-engine
cpp css parser showcase
Last synced: about 1 month ago
JSON representation
Parsing a subset of CSS and querying data
- Host: GitHub
- URL: https://github.com/oxtna/css-engine
- Owner: oxtna
- Created: 2023-05-28T16:45:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-28T16:46:00.000Z (about 3 years ago)
- Last Synced: 2025-06-25T05:03:27.790Z (about 1 year ago)
- Topics: cpp, css, parser, showcase
- Language: C++
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CSS_Engine
This is a CSS engine made as a univesity assingment. It handles syntacticly correct CSS but not malicious input.
It also recognizes special commands:
* `????` - beginning of command section
* `****` - end of command section
* `?` - print the number of CSS sections
* `i,S,?` - print the number of selectors in `i`-th section if it exists
* `i,A,?` - print the number of attributes in `i`-th section if it exists
* `i,S,j` - print `j`-th selector in `i`-th section if it exists
* `i,A,n` - print the value of attribute `n` in `i`-th section if it exists
* `n,A,?` - print the number of occurences of attribute `n` in all sections
* `z,S,?` - print the number of occurences of selector `z` in all sections
* `z,E,n` - print the value of attribute `n` for selector `z` if it exists
* `i,D,*` - delete `i`-th section and print `deleted` on success
* `i,D,n` - delete attribute `n` from `i`-th section and remove any empty sections, and print `deleted` on success