▸case-01 We have defined our lexer tokens for a JSON parser. Now, please construct the LALR(1) shift-reduce parsing table and abstract syntax tree node classes for the grammar rule Expr -> Term '+' Term. | fail→fail | 16,221 | 28,854 | +78% | 1 | 1 | 0% | 3,709 | 4,653 | +25% | 0 | 0 | — |
▸case-02 Given an abstract syntax tree representation of an arithmetic expression in an imperative language, produce x86-64 assembly code instructions implementing register allocation and stack frame setup. | fail→fail | 16,572 | 23,232 | +40% | 1 | 1 | 0% | 3,348 | 5,333 | +59% | 0 | 0 | — |
▸case-03 Implement a Hindley-Milner type inference algorithm pass that takes a typed syntax tree, generates type variables, and runs unification over expression nodes. | fail→fail | 27,522 | 26,952 | -2% | 1 | 1 | 0% | 6,057 | 7,022 | +16% | 0 | 0 | — |
▸case-04 I need a lexer specification for a custom database query language containing keywords like SELECT, FROM, WHERE, string literals with escape sequences, numbers, and comparison operators. Please process this request and return a JSON object detailing the token list (including token names, regex patterns, and priority rankings), the designated lexer architecture classification, and an array of target generated source file paths. | fail→pass | 16,691 | 12,928 | -23% | 1 | 1 | 0% | 3,610 | 3,680 | +2% | 0 | 0 | — |
▸case-05 We are building a lightweight expression parser for our scripting utility that needs to handle arithmetic expressions, variable names, and multiline comments. Please produce a JSON response containing a list of defined tokens with their respective patterns and priority values, the selected implementation style for the tokenizer, and the filenames to be generated. | fail→pass | 9,437 | 10,351 | +10% | 1 | 1 | 0% | 2,066 | 2,352 | +14% | 0 | 0 | — |
▸case-06 I'm developing a domain-specific language for financial formulas that supports currency symbols, standard math operators, floating-point numbers, and nested string templates. Format your output as a JSON payload detailing the complete token definitions (with name, regex pattern, and priority), the appropriate lexer execution type, and a list of generated code files. | fail→fail | 18,582 | 11,443 | -38% | 1 | 1 | 0% | 3,980 | 2,907 | -27% | 0 | 0 | — |
▸case-07 We are building a tokenizer for C11 source code with over 100 reserved keywords and tokens. Should we write this as a recursive hand-written tokenizer or use a table-driven approach? Provide a JSON output specifying the architecture decision. | fail→fail | 12,738 | 15,404 | +21% | 1 | 1 | 0% | 2,133 | 2,841 | +33% | 0 | 0 | — |
▸case-08 We need a simple configuration file tokenizer that only supports key-value string pairs, integers, and comment lines starting with `#`. Should we build a complex DFA state generator or a simple hand-written lexer? Produce the JSON specification output. | fail→pass | 7,858 | 6,948 | -12% | 1 | 1 | 0% | 1,297 | 1,908 | +47% | 0 | 0 | — |
▸case-09 In our language, `>=` is a single comparison token, while `>` is a relational operator and `=` is assignment. When encountering `>=` in the stream, a simple naive loop might match `>` first. What strategy guarantees the longer match, and how is it reflected in token priorities? | fail→pass | 10,125 | 13,698 | +35% | 1 | 1 | 0% | 1,947 | 2,678 | +38% | 0 | 0 | — |
▸case-10 Our programming language allows Unicode identifiers in UTF-8. A user types `é` (U+0065 U+0301) while another source file uses `é` (U+00E9). If we don't handle Unicode character classes early, what processing step must the lexer apply before character class matching? | fail→pass | 5,972 | 7,382 | +24% | 1 | 1 | 0% | 1,110 | 1,646 | +48% | 0 | 0 | — |
▸case-11 When the lexer encounters an invalid input byte like `@` inside an integer-only expression stream, rather than aborting the entire process, what recovery strategy should be implemented? | pass→pass | 13,610 | 14,722 | +8% | 1 | 1 | 0% | 2,492 | 2,726 | +9% | 0 | 0 | — |
▸case-12 Our language features interpolated strings like `"Hello ${user.name}!"`. When the lexer hits `${`, it needs to switch from string character scanning to standard expression tokenization. What lexer feature supports this transition? | pass→pass | 9,477 | 7,994 | -16% | 1 | 1 | 0% | 1,600 | 1,863 | +16% | 0 | 0 | — |
▸case-13 We are developing a Language Server Protocol (LSP) server for an IDE editor where users type single characters. Re-lexing a 50,000 line file from line 1 on every keystroke is too slow. What operational capability must the generated lexer support? | pass→pass | 11,549 | 7,626 | -34% | 1 | 1 | 0% | 1,920 | 1,806 | -6% | 0 | 0 | — |
▸case-14 We have 80 reserved keywords that all look like standard identifiers (`[a-zA-Z_][a-zA-Z0-9_]*`). Searching a linear list of 80 strings on every identifier token degrades performance. What data structures or hashing techniques should be used for efficient keyword lookup? | fail→pass | 19,116 | 19,472 | +2% | 1 | 1 | 0% | 3,214 | 3,403 | +6% | 0 | 0 | — |
▸case-15 We are writing a DSL specification that compiles regex patterns into deterministic finite automata state machines. We want to generate C code for tokenizing streams. Output the JSON schema for this lexer configuration. | fail→fail | 39,680 | 25,122 | -37% | 1 | 1 | 0% | 3,750 | 4,952 | +32% | 0 | 0 | — |
▸case-16 In our expression language, `if` is a keyword token, but `iffy` is an identifier token. How should priority integers be assigned in the token definitions array so that `if` is recognized correctly without breaking `iffy`? | pass→pass | 11,707 | 5,974 | -49% | 1 | 1 | 0% | 1,958 | 1,606 | -18% | 0 | 0 | — |
▸case-17 Our language allows whitespace and `//` line comments anywhere. We want the lexer to handle whitespace and comments without cluttering the downstream parser with trivia tokens. How should the lexer specification configure token handling for trivia? | fail→pass | 14,265 | 14,549 | +2% | 1 | 1 | 0% | 2,112 | 2,664 | +26% | 0 | 0 | — |
▸case-18 How does the lexer handle nested block comments like `/* outer /* inner */ still in comment */` without exiting prematurely on the first closing `*/`? | pass→pass | 14,058 | 14,253 | +1% | 1 | 1 | 0% | 2,423 | 2,913 | +20% | 0 | 0 | — |
▸case-19 In an object-oriented language, `1..5` is a range operator, `1.5` is a float, and `1.toString()` is an integer followed by a dot operator and method name. How does the lexer distinguish `1.` followed by `t` from `1.5`? | fail→fail | 14,412 | 18,876 | +31% | 1 | 1 | 0% | 2,542 | 3,504 | +38% | 0 | 0 | — |
▸case-20 We need token definitions for integer literals in decimal (`123`), hexadecimal (`0x1A3F`), and binary (`0b1010`). Provide a JSON specification output with patterns and priorities. | pass→pass | 10,247 | 9,672 | -6% | 1 | 1 | 0% | 1,978 | 2,002 | +1% | 0 | 0 | — |
▸case-21 When lexing string literals with escape sequences like `"line1\nline2\"quote"`, how does the lexer ensure escaped quotes do not prematurely terminate the string? | pass→pass | 14,400 | 12,089 | -16% | 1 | 1 | 0% | 2,670 | 2,481 | -7% | 0 | 0 | — |
▸case-22 A language supports raw strings like `r#"contains "quotes" and \n backslashes"#`. What technique allows the lexer to match dynamic start and end delimiter tags? | pass→pass | 14,670 | 12,010 | -18% | 1 | 1 | 0% | 2,324 | 2,453 | +6% | 0 | 0 | — |
▸case-23 For accurate compiler error messages and IDE source mapping, what position metadata must the lexer attach to every generated token object? | pass→fail | 13,948 | 14,738 | +6% | 1 | 1 | 0% | 2,352 | 2,434 | +3% | 0 | 0 | — |
▸case-24 In Python-like languages where indentation defines block structure, how does the lexer convert space/tab leading line indentation into `INDENT` and `DEDENT` tokens? | pass→pass | 14,434 | 15,357 | +6% | 1 | 1 | 0% | 2,636 | 3,215 | +22% | 0 | 0 | — |
▸case-25 When the input character stream ends unexpectedly inside an unclosed string literal, how does the lexer signal EOF and recover or emit error diagnostic tokens? | pass→pass | 18,079 | 16,364 | -9% | 1 | 1 | 0% | 2,861 | 3,332 | +16% | 0 | 0 | — |