Re: [dev-servo] CSS parser architecture: data structures vs. callbacks

2013-02-13 Thread Zack Weinberg
On 2013-02-12 1:37 AM, Robert O'Callahan wrote: On Tue, Feb 12, 2013 at 6:32 PM, Zack Weinberg wrote: You want to do this as lazily as possible, since with high probability no human will ever look at any given CSS error message. However, I would still go for the "add source location informati

Re: [dev-servo] CSS parser architecture: data structures vs. callbacks

2013-02-12 Thread Robert O'Callahan
On Tue, Feb 12, 2013 at 9:29 PM, Nicholas Nethercote wrote: > That's fine so long as you don't have the equivalent of C's #line > defines. I don't know if CSS has them but JavaScript does (in source > maps) which makes things much more difficult. > CSS doesn't, but those #line defines just crea

Re: [dev-servo] CSS parser architecture: data structures vs. callbacks

2013-02-12 Thread Nicholas Nethercote
On Mon, Feb 11, 2013 at 10:37 PM, Robert O'Callahan wrote: > > Couldn't you just make it a pointer into the text of the style sheet? Then > an auxiliary data structure could be used to quickly extract a line number > given such a pointer. (E.g. for each 256 byte boundary in the style sheet, > stor

Re: [dev-servo] CSS parser architecture: data structures vs. callbacks

2013-02-11 Thread Robert O'Callahan
On Tue, Feb 12, 2013 at 6:32 PM, Zack Weinberg wrote: > You want to do this as lazily as possible, since with high probability no > human will ever look at any given CSS error message. However, I would > still go for the "add source location information to every token" approach > in a greenfield

Re: [dev-servo] CSS parser architecture: data structures vs. callbacks

2013-02-11 Thread Zack Weinberg
On 2013-02-08 12:36 PM, Simon Sapin wrote: Hi dev-servo, So my CSS parser in Rust is coming along nicely: https://github.com/SimonSapin/rust-cssparser/ It’s mostly complete, although I still need to write some tests and catch up with spec changes. We’re working on the remaining css3-syntax issu

Re: [dev-servo] CSS parser architecture: data structures vs. callbacks

2013-02-11 Thread Brian Anderson
On 02/08/2013 09:36 AM, Simon Sapin wrote: Hi dev-servo, So my CSS parser in Rust is coming along nicely: https://github.com/SimonSapin/rust-cssparser/ It’s mostly complete, although I still need to write some tests and catch up with spec changes. We’re working on the remaining css3-syntax is

[dev-servo] CSS parser architecture: data structures vs. callbacks

2013-02-08 Thread Simon Sapin
Hi dev-servo, So my CSS parser in Rust is coming along nicely: https://github.com/SimonSapin/rust-cssparser/ It’s mostly complete, although I still need to write some tests and catch up with spec changes. We’re working on the remaining css3-syntax issues in the CSS WG. http://dev.w3.org/csswg