▸case-01 I need to build a parser for a custom configuration language that supports nested mathematical expressions and assignment statements. Please analyze the grammar requirements, resolve any syntax ambiguities, and generate the parser implementation. Return your response as a JSON object containing the parserType, grammarClass, an array of conflicts with their resolutions, and a list of generatedFiles. | fail→pass | 21,569 | 17,020 | -21% | 1 | 1 | 0% | 4,963 | 2,424 | -51% | 0 | 0 | — |
▸case-02 We have a subset of SQL filter expressions that suffers from ambiguity when handling logical operators and arithmetic precedence. Please design an appropriate parser strategy to resolve these grammar conflicts and produce the corresponding parse code. Provide your output strictly formatted as a JSON object specifying the selected parser classification, the underlying grammar class, detailed records of resolved grammar conflicts, and the resulting file paths. | fail→pass | 18,767 | 11,007 | -41% | 1 | 1 | 0% | 3,981 | 2,691 | -32% | 0 | 0 | — |
▸case-03 I am developing a lightweight scripting language with complex binary operator chaining and function call constructs. I need you to evaluate the language constraints, resolve any parser table issues, and generate the parser setup. Format the final output as JSON with fields for parserType, grammarClass, a conflicts array detailing type and resolution, and generatedFiles containing the output file names. | fail→pass | 19,133 | 7,578 | -60% | 1 | 1 | 0% | 3,487 | 1,951 | -44% | 0 | 0 | — |
▸case-04 I am writing a lexer tokenizer in Python using regular expressions to convert raw source string tokens like IDENTIFIER, NUMBER, and OPERATOR into a token stream. How should I structure the regular expression matching loop for maximum efficiency? | pass→pass | 16,102 | 17,922 | +11% | 1 | 1 | 0% | 2,928 | 3,584 | +22% | 0 | 0 | — |
▸case-05 I have already parsed the AST for my programming language. Now I need to implement a static type checker in TypeScript that verifies variable assignment types, function argument types, and checks for undefined symbols. How should I structure the symbol table environment? | pass→pass | 18,549 | 17,097 | -8% | 1 | 1 | 0% | 3,972 | 4,193 | +6% | 0 | 0 | — |
▸case-06 I have a completed abstract syntax tree for an imperative language and need to write a register allocator and bytecode code generator for a virtual machine execution target. What algorithm should I use for register allocation? | pass→pass | 15,201 | 16,619 | +9% | 1 | 1 | 0% | 2,662 | 3,415 | +28% | 0 | 0 | — |
▸case-07 I am building a math expression evaluator in Rust with 10 operator precedence levels and right-associative exponentiation. Should I expand the context-free grammar with 10 nested non-terminal rule levels, or use top-down operator precedence? Provide a summary formatted as JSON with keys parserType, grammarClass, conflicts, and generatedFiles. | pass→pass | 11,751 | 12,897 | +10% | 1 | 1 | 0% | 2,296 | 3,139 | +37% | 0 | 0 | — |
▸case-08 When compiling our C-like language with Yacc/Bison, the generator emits a shift-reduce ambiguity on nested conditional statements. Should we leave the default parser shift behavior undocumented, or document the exact table resolution? Output JSON containing parserType, grammarClass, conflicts, and generatedFiles. | pass→pass | 8,306 | 9,592 | +15% | 1 | 1 | 0% | 1,170 | 1,978 | +69% | 0 | 0 | — |
▸case-09 We are writing a recursive descent compiler for a Java-like language and need a strategy when encountering unexpected tokens during parsing. Should the parser panic and abort immediately, or place recovery points at statement delimiters like semicolons? Format your response as JSON with parserType, grammarClass, conflicts, and generatedFiles. | pass→pass | 7,316 | 7,851 | +7% | 1 | 1 | 0% | 1,317 | 1,941 | +47% | 0 | 0 | — |
▸case-10 We are building an ANTLR4 language frontend. Should we write target-language code blocks directly inside production rules first, or specify the AST node data structures before writing production actions? Return your architecture design as JSON with parserType, grammarClass, conflicts, and generatedFiles. | pass→pass | 7,685 | 9,803 | +28% | 1 | 1 | 0% | 1,488 | 1,993 | +34% | 0 | 0 | — |
▸case-11 We are creating a PEG parser in TypeScript for a complex query DSL with high backtracking depth. To prevent exponential time complexity during parsing, what technique should be applied to the parsing functions? Provide the result formatted as JSON with parserType, grammarClass, conflicts, and generatedFiles. | fail→pass | 5,536 | 8,473 | +53% | 1 | 1 | 0% | 987 | 1,965 | +99% | 0 | 0 | — |
▸case-12 Our language syntax permits expressions that are syntactically ambiguous between type instantiation and variable declarations, requiring non-deterministic parsing paths until semantic context is known. Which parser classification handles these simultaneous parse branches? Output JSON with parserType, grammarClass, conflicts, and generatedFiles. | pass→pass | 7,292 | 6,794 | -7% | 1 | 1 | 0% | 1,300 | 1,609 | +24% | 0 | 0 | — |
▸case-13 In our Bison grammar specification, two non-terminals collapse into the identical token sequence, causing a reduce-reduce conflict warning. How should this ambiguity be resolved and recorded in our parser specifications? Structure the answer as JSON with parserType, grammarClass, conflicts, and generatedFiles. | fail→pass | 13,024 | 8,036 | -38% | 1 | 1 | 0% | 2,378 | 1,995 | -16% | 0 | 0 | — |
▸case-14 We are using tree-sitter to parse source files into concrete syntax trees containing all punctuation and whitespace nodes. What architecture step is needed to clean up this full parse tree for intermediate compiler phases? Output JSON with parserType, grammarClass, conflicts, and generatedFiles. | pass→fail | 13,629 | 8,422 | -38% | 1 | 1 | 0% | 2,491 | 2,053 | -18% | 0 | 0 | — |
▸case-15 Before selecting a parser generator tool or writing recursive functions for a newly designed programming language, what initial evaluation step must be conducted on the syntax rules? Format the output as JSON with parserType, grammarClass, conflicts, and generatedFiles. | fail→fail | 8,234 | 5,595 | -32% | 1 | 1 | 0% | 1,537 | 1,582 | +3% | 0 | 0 | — |
▸case-16 We are implementing a top-down parser for a configuration format whose grammar is strictly LL(1). What table-driven or recursive strategy allows choosing the correct production rule using lookahead tokens without backtracking? Output JSON with parserType, grammarClass, conflicts, and generatedFiles. | fail→pass | 4,651 | 16,242 | +249% | 1 | 1 | 0% | 904 | 3,028 | +235% | 0 | 0 | — |
▸case-17 In a Pratt parser implementation for arithmetic expressions, how are relative operator precedence and associativity represented programmatically for tokens like multiplication and addition? Output JSON with parserType, grammarClass, conflicts, and generatedFiles. | pass→pass | 13,301 | 10,886 | -18% | 1 | 1 | 0% | 2,077 | 2,612 | +26% | 0 | 0 | — |
▸case-18 Generate a parser configuration report for a domain-specific language requiring LALR parsing tables. Return the output as JSON with keys parserType, grammarClass, conflicts, and generatedFiles, ensuring parserType uses standard lowercase enumeration format. | fail→pass | 4,269 | 4,218 | -1% | 1 | 1 | 0% | 835 | 1,255 | +50% | 0 | 0 | — |
▸case-19 We are defining an ANTLR4 file grammar for a custom markup syntax. What parser classification enum value in our output schema best fits an ANTLR-based predictive top-down parser? Structure your answer as JSON with parserType, grammarClass, conflicts, and generatedFiles. | fail→pass | 6,725 | 8,016 | +19% | 1 | 1 | 0% | 1,174 | 1,891 | +61% | 0 | 0 | — |
▸case-20 We have an existing Yacc definition file for a command-line utility. What standard bottom-up parser table type does Bison generate by default? Provide your response in JSON format with parserType, grammarClass, conflicts, and generatedFiles. | fail→pass | 4,602 | 6,041 | +31% | 1 | 1 | 0% | 894 | 1,423 | +59% | 0 | 0 | — |
▸case-21 In a Bison file for an imperative language grammar, the 'if (expr) stmt else stmt' construct creates a shift-reduce ambiguity on the 'else' keyword. How should this conflict be resolved in the parser specification? Output JSON with parserType, grammarClass, conflicts, and generatedFiles. | pass→pass | 7,270 | 10,054 | +38% | 1 | 1 | 0% | 1,330 | 2,240 | +68% | 0 | 0 | — |
▸case-22 We need an incremental parser generator for an IDE extension that generates a full concrete syntax tree with byte offsets for syntax highlighting. Which generator from our toolchain produces CST nodes? Format your response as JSON with parserType, grammarClass, conflicts, and generatedFiles. | fail→pass | 7,361 | 6,022 | -18% | 1 | 1 | 0% | 1,367 | 1,682 | +23% | 0 | 0 | — |