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
Rewrite the parser to be fully incremental #68
Closed
+2,026
−1,546
Avoid "rewinding" the input in the tokenizer.
520f8fe
Select commit
101c330
Add a regression test for a tinycss2 bug.
SimonSapin 95ad783
Add more regression tests for tinycss2 bugs.
SimonSapin 691160f
Identifiers may now begin with "--".
ezequiel 19d6b4c
The semicolon token should not be respected.
ezequiel 729aaf3
Merge pull request #3 from ezequiel/ident
SimonSapin 434d99a
Merge pull request #4 from ezequiel/semicolon
SimonSapin 9a5f5a0
Add some test cases for tinycss2 code coverage.
SimonSapin 5afe94a
`!` not followed by `important` is just another declaration value.
SimonSapin b89d403
Quoted URLs are now tokenized as functions.
rgrove cdda691
Make bad URL function tests more useful.
rgrove 86d34b7
Merge pull request #5 from rgrove/url-functions
SimonSapin 482840d
Remove NUL handling from preprocessing.
SimonSapin b6c0b0c
Disable line counting temporarily.
SimonSapin 8aafbd2
Remove newline handling from preprocessing.
SimonSapin 98c1e58
Remove the tokenizer’s pre-processing step.
SimonSapin 14b5a4c
Make the tokenizer borrow rather than own its input.
SimonSapin 5960123
Merge css-parsing-tests commit '86d34b729978df74bc91a66ce0e2951187a10…
SimonSapin d211431
Allow idents to start with --
SimonSapin 41fa928
Rewrite ALL THE THINGS!
SimonSapin 3afdf40
Use the `matches` crate rather than re-defining multiple copies of it.
SimonSapin 9965b0d
Use `while let` instead of `loop` + `match` + `break`.
SimonSapin 307180f
Remove the Tokenizer::length field.
SimonSapin 90168be
Encapsulate input/position access in tokenizer.
SimonSapin 520f8fe
Avoid "rewinding" the input in the tokenizer.
SimonSapin 88eb753
Merge branch 'rustup_20141221' into incremental
SimonSapin a8b8f97
Fix Rust-upgrade warnings.
SimonSapin 57128c1
Add and use a match_ignore_ascii_case! macro.
SimonSapin 6a69f0f
Fix incorrect doc-comment.
SimonSapin 0b9da96
Don’t preserve the full string representation of numbers.
SimonSapin b67e3c5
Change all `String` fields in `Token` to `CowString`.
SimonSapin c9632be
Use `Cow::Borrowed` for the value of ident-like tokens without escape…
SimonSapin f307a40
Use `Cow::Borrowed` for the value of string-like tokens without escap…
SimonSapin f52dad3
Use `Cow::Borrowed` for the value of unquoted URL tokens without esca…
SimonSapin 0172d58
Fix escaped NULs
SimonSapin d2531ef
Make Parser.tokenizer not be an Option. Have a boolean field instead.
SimonSapin e59f5cf
Make Tokenizer::slice_from public.
SimonSapin 66dfce8
Add SourceLocation (line numbers) back, but on demand.
SimonSapin fe4c3b9
Make {Rule,Declaration}RuleListParser fields public.
SimonSapin 516c1c6
Rename TokenizerPosition to SourcePosition
SimonSapin 8d8ea17
Add Parser::expect_url_or_string
SimonSapin 702ec92
Allow parse_until_before to be reentrant
SimonSapin 40b851e
Add Parser::parse_comma_separated
SimonSapin 2a69030
Add Parser::expect_ident_or_string
SimonSapin bd837b1
Add DeclarationListParser::run and RuleListParser::run.
SimonSapin f5b224a
Add Parser::expect_{ident_matching,delim,function}
SimonSapin c971b14
Add Parser::unexpected_ident
SimonSapin 29a6941
Rename AtRulePrelude to AtRuleType
SimonSapin 1796776
Refactor parser.rs to simplify it and propably fix multiple bugs.
SimonSapin cdcb0b4
Make Parser::new take a &str instead of &mut Tokenizer, and remove Pa…
SimonSapin d53c0d3
Implement Clone for Parser.
SimonSapin df19cde
Make source location methods take &self instead of &mut self. (Use a …
SimonSapin 22317ac
Reformat some code for readability.
SimonSapin 563d178
Fix some parsing bugs.
SimonSapin 03d06b3
Remove ast.rs file left over from 41fa928b7df1acc05b16af5f4ec3edb2292…
SimonSapin 0480fa9
Change Token::Percentage to have values in 0..1 instead of 0..100
SimonSapin 4ebb01a
Internal refactor: have "nested" parsers not consume their end token.
SimonSapin d124386
Internal refactor: remove the Parser::exhausted boolean flag.
SimonSapin 12b2939
Internal refactor: remove consume_until_end_of_block’s return value.
SimonSapin 8da3a37
Internal refactor: merge parse_until_before_end_of into parse_until_b…
SimonSapin 1389597
Internal refactor: rename Tokenizer::current_char to next_char.
SimonSapin 2111d66
Remove peek/push_back/unexpect, add Parser::reset instead.
SimonSapin d40971b
Internal refactor: Rename Parser::parse_until_before to stop_before.
SimonSapin b8bfa5f
Enable Parser::try’s return value to borrow the input (e.g. be a token)
SimonSapin 281f911
Add Parser::expect_{square_bracket,parethesis}_block
SimonSapin 1c6672a
Internal refactor: make some code easier to understand.
SimonSapin 45741e0
Fix bug with delimiter parser going over their limit because of CSS c…
SimonSapin 0c8be75
Simplify parse_important.
SimonSapin ca3bfb9
Emit a token for CSS comments.
SimonSapin 83b7cc8
Keep in tokens the origin content of whitespace and comments.
SimonSapin 55e0824
Serialize negative zero with a minus sign.
SimonSapin d911962
Serialize <unicode-range> with question marks when possible.
SimonSapin f94502f
Remove some unnecessary conversions.
SimonSapin 8636623
Remove serialization special cases now that comments are tokenized.
SimonSapin 8d1b3e2
Add Parser::expect_function_matching
SimonSapin
Closed
Rewrite the parser to be fully incremental #68
Avoid "rewinding" the input in the tokenizer.
Jan 3, 2014
Apr 21, 2014
Jul 21, 2014
Jul 21, 2014
Aug 16, 2014
Aug 16, 2014
Aug 16, 2014
Aug 16, 2014
Oct 6, 2014
Oct 8, 2014
Oct 8, 2014
Dec 23, 2014
Dec 23, 2014
Dec 23, 2014
Dec 23, 2014
Dec 23, 2014
Dec 28, 2014
Dec 28, 2014
Dec 23, 2014
Dec 29, 2014
Dec 29, 2014
Dec 29, 2014
Dec 29, 2014
Dec 29, 2014
Jan 5, 2015
Jan 5, 2015
Jan 5, 2015
Jan 5, 2015
Jan 5, 2015
Jan 5, 2015
Jan 6, 2015
Jan 6, 2015
Jan 6, 2015
Jan 6, 2015
Jan 6, 2015
Jan 6, 2015
Jan 6, 2015
Jan 6, 2015
Jan 6, 2015
Jan 6, 2015
Jan 6, 2015
Jan 6, 2015
Jan 7, 2015
Jan 7, 2015
Jan 8, 2015
Jan 8, 2015
Jan 8, 2015
Jan 13, 2015
Jan 12, 2015
Jan 12, 2015
Jan 13, 2015
Jan 14, 2015
Jan 15, 2015
Jan 15, 2015
Jan 15, 2015
Jan 16, 2015
Jan 16, 2015
Jan 16, 2015
Jan 16, 2015
Jan 16, 2015
Jan 16, 2015
Jan 16, 2015
Jan 19, 2015
Jan 19, 2015
Jan 19, 2015
Jan 19, 2015
Jan 19, 2015
Jan 20, 2015
Jan 20, 2015
Jan 21, 2015
Jan 21, 2015
Jan 21, 2015
Jan 21, 2015
Jan 21, 2015
520f8fe
Select commit
101c330
Add a regression test for a tinycss2 bug.
SimonSapin 95ad783
Add more regression tests for tinycss2 bugs.
SimonSapin 691160f
Identifiers may now begin with "--".
ezequiel 19d6b4c
The semicolon token should not be respected.
ezequiel 729aaf3
Merge pull request #3 from ezequiel/ident
SimonSapin 434d99a
Merge pull request #4 from ezequiel/semicolon
SimonSapin 9a5f5a0
Add some test cases for tinycss2 code coverage.
SimonSapin 5afe94a
`!` not followed by `important` is just another declaration value.
SimonSapin b89d403
Quoted URLs are now tokenized as functions.
rgrove cdda691
Make bad URL function tests more useful.
rgrove 86d34b7
Merge pull request #5 from rgrove/url-functions
SimonSapin 482840d
Remove NUL handling from preprocessing.
SimonSapin b6c0b0c
Disable line counting temporarily.
SimonSapin 8aafbd2
Remove newline handling from preprocessing.
SimonSapin 98c1e58
Remove the tokenizer’s pre-processing step.
SimonSapin 14b5a4c
Make the tokenizer borrow rather than own its input.
SimonSapin 5960123
Merge css-parsing-tests commit '86d34b729978df74bc91a66ce0e2951187a10…
SimonSapin d211431
Allow idents to start with --
SimonSapin 41fa928
Rewrite ALL THE THINGS!
SimonSapin 3afdf40
Use the `matches` crate rather than re-defining multiple copies of it.
SimonSapin 9965b0d
Use `while let` instead of `loop` + `match` + `break`.
SimonSapin 307180f
Remove the Tokenizer::length field.
SimonSapin 90168be
Encapsulate input/position access in tokenizer.
SimonSapin 520f8fe
Avoid "rewinding" the input in the tokenizer.
SimonSapin 88eb753
Merge branch 'rustup_20141221' into incremental
SimonSapin a8b8f97
Fix Rust-upgrade warnings.
SimonSapin 57128c1
Add and use a match_ignore_ascii_case! macro.
SimonSapin 6a69f0f
Fix incorrect doc-comment.
SimonSapin 0b9da96
Don’t preserve the full string representation of numbers.
SimonSapin b67e3c5
Change all `String` fields in `Token` to `CowString`.
SimonSapin c9632be
Use `Cow::Borrowed` for the value of ident-like tokens without escape…
SimonSapin f307a40
Use `Cow::Borrowed` for the value of string-like tokens without escap…
SimonSapin f52dad3
Use `Cow::Borrowed` for the value of unquoted URL tokens without esca…
SimonSapin 0172d58
Fix escaped NULs
SimonSapin d2531ef
Make Parser.tokenizer not be an Option. Have a boolean field instead.
SimonSapin e59f5cf
Make Tokenizer::slice_from public.
SimonSapin 66dfce8
Add SourceLocation (line numbers) back, but on demand.
SimonSapin fe4c3b9
Make {Rule,Declaration}RuleListParser fields public.
SimonSapin 516c1c6
Rename TokenizerPosition to SourcePosition
SimonSapin 8d8ea17
Add Parser::expect_url_or_string
SimonSapin 702ec92
Allow parse_until_before to be reentrant
SimonSapin 40b851e
Add Parser::parse_comma_separated
SimonSapin 2a69030
Add Parser::expect_ident_or_string
SimonSapin bd837b1
Add DeclarationListParser::run and RuleListParser::run.
SimonSapin f5b224a
Add Parser::expect_{ident_matching,delim,function}
SimonSapin c971b14
Add Parser::unexpected_ident
SimonSapin 29a6941
Rename AtRulePrelude to AtRuleType
SimonSapin 1796776
Refactor parser.rs to simplify it and propably fix multiple bugs.
SimonSapin cdcb0b4
Make Parser::new take a &str instead of &mut Tokenizer, and remove Pa…
SimonSapin d53c0d3
Implement Clone for Parser.
SimonSapin df19cde
Make source location methods take &self instead of &mut self. (Use a …
SimonSapin 22317ac
Reformat some code for readability.
SimonSapin 563d178
Fix some parsing bugs.
SimonSapin 03d06b3
Remove ast.rs file left over from 41fa928b7df1acc05b16af5f4ec3edb2292…
SimonSapin 0480fa9
Change Token::Percentage to have values in 0..1 instead of 0..100
SimonSapin 4ebb01a
Internal refactor: have "nested" parsers not consume their end token.
SimonSapin d124386
Internal refactor: remove the Parser::exhausted boolean flag.
SimonSapin 12b2939
Internal refactor: remove consume_until_end_of_block’s return value.
SimonSapin 8da3a37
Internal refactor: merge parse_until_before_end_of into parse_until_b…
SimonSapin 1389597
Internal refactor: rename Tokenizer::current_char to next_char.
SimonSapin 2111d66
Remove peek/push_back/unexpect, add Parser::reset instead.
SimonSapin d40971b
Internal refactor: Rename Parser::parse_until_before to stop_before.
SimonSapin b8bfa5f
Enable Parser::try’s return value to borrow the input (e.g. be a token)
SimonSapin 281f911
Add Parser::expect_{square_bracket,parethesis}_block
SimonSapin 1c6672a
Internal refactor: make some code easier to understand.
SimonSapin 45741e0
Fix bug with delimiter parser going over their limit because of CSS c…
SimonSapin 0c8be75
Simplify parse_important.
SimonSapin ca3bfb9
Emit a token for CSS comments.
SimonSapin 83b7cc8
Keep in tokens the origin content of whitespace and comments.
SimonSapin 55e0824
Serialize negative zero with a minus sign.
SimonSapin d911962
Serialize <unicode-range> with question marks when possible.
SimonSapin f94502f
Remove some unnecessary conversions.
SimonSapin 8636623
Remove serialization special cases now that comments are tokenized.
SimonSapin 8d1b3e2
Add Parser::expect_function_matching
SimonSapin