Strategy for grouping specific tokens together #10

Open
opened 2024-08-08 16:12:03 +02:00 by xqtc · 0 comments
Owner

It could make parsing way more efficient, if we iterate over the tokens and group them together before handing them to the (yet to come) parser. Something like terms and functions should be grouped together.

Example:

Input (glsl): vec4 uwu = vec4(1., 1., 1., 1.) + vec4(1., 1., 1., 1.)

Output (tokens): Token::VEC4, Token::Identifier("uwu"), Token::EQ_OP, Token::Term(Vec<>)
It could make parsing way more efficient, if we iterate over the tokens and group them together before handing them to the (yet to come) parser. Something like terms and functions should be grouped together. Example: ``` Input (glsl): vec4 uwu = vec4(1., 1., 1., 1.) + vec4(1., 1., 1., 1.) Output (tokens): Token::VEC4, Token::Identifier("uwu"), Token::EQ_OP, Token::Term(Vec<>) ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
xqtc/glsl-lexer#10
No description provided.