▸case-01 I need a formal grammar definition for a custom math expression DSL that supports basic arithmetic, exponentiation, and variable assignments. Please produce a specification and analyze its structure for parser implementation. Return a JSON summary detailing the notation system used, target parser family, total count of production rules, any grammar conflicts identified, and the list of output spec files produced. | fail→pass | 27,770 | 22,120 | -20% | 1 | 1 | 0% | 5,658 | 4,218 | -25% | 0 | 0 | — |
▸case-02 We are building a configuration file parser and need to formalize its syntax to eliminate dangling else ambiguity and nested block conflicts. Analyze our proposed constructs and format your response as a structured JSON object containing the grammar notation variant, the target parser engine type, the number of rule productions, an array of lingering ambiguity conflicts, and a list of created grammar definition files. | fail→pass | 21,924 | 5,218 | -76% | 1 | 1 | 0% | 4,710 | 1,539 | -67% | 0 | 0 | — |
▸case-03 I am developing a lightweight data serialization format and need a formal grammar spec created for a PEG parser generator. Please design the grammar rules, checking for recursive ambiguities or parsing conflicts. Provide the output as a JSON payload specifying the chosen notation format, target parser classification, total production rule count, any detected rule conflicts, and all generated file paths. | fail→pass | 23,157 | 22,953 | -1% | 1 | 1 | 0% | 4,800 | 5,197 | +8% | 0 | 0 | — |
▸case-04 We have completed our formal EBNF grammar and AST definition for a statically typed language. Now write a TypeScript type checker function that traverses the AST nodes to enforce type checking rules and raise type mismatch errors. | pass→fail | 31,851 | 32,506 | +2% | 1 | 1 | 0% | 7,817 | 8,181 | +5% | 0 | 0 | — |
▸case-05 We already have our Lex/Flex token definitions ready. Write a C language ring-buffer input stream implementation for the lexer that reads chunks from file descriptor input and handles EOF boundaries. | pass→fail | 22,412 | 25,801 | +15% | 1 | 1 | 0% | 4,417 | 6,085 | +38% | 0 | 0 | — |
▸case-06 Our parser successfully outputs bytecode instructions. Write a Python virtual machine interpreter loop that executes 'PUSH', 'ADD', 'SUB', and 'JMP' opcodes on an evaluation stack. | pass→pass | 11,421 | 12,929 | +13% | 1 | 1 | 0% | 2,350 | 2,986 | +27% | 0 | 0 | — |
▸case-07 Design an expression grammar for a scientific calculator supporting addition, multiplication, and exponentiation. You might be tempted to write custom regex shorthand, but provide a formal specification and output the standard JSON summary. | fail→pass | 17,117 | 19,294 | +13% | 1 | 1 | 0% | 3,563 | 4,466 | +25% | 0 | 0 | — |
▸case-08 Create an EBNF grammar specification for standard arithmetic containing addition, subtraction, multiplication, division, and exponentiation. Design the production hierarchy so that multiplication binds tighter than addition, and exponentiation is right-associative. Provide the result in the JSON format. | fail→pass | 18,794 | 23,361 | +24% | 1 | 1 | 0% | 3,332 | 5,413 | +62% | 0 | 0 | — |
▸case-09 In our imperative language proposal, conditional statements follow 'if COND then STMT' and 'if COND then STMT else STMT'. A naive grammar is ambiguous for nested conditionals. Re-design the grammar rules to unambiguously match each 'else' to the closest preceding 'if', and output the grammar metadata JSON. | fail→pass | 21,185 | 10,291 | -51% | 1 | 1 | 0% | 2,766 | 2,675 | -3% | 0 | 0 | — |
▸case-10 We are building a top-down recursive descent parser and need an LL(1) grammar for boolean expressions. The initial proposal uses direct left recursion: 'Expr ::= Expr OR Term | Term'. Refactor this left-recursive rule to be valid for LL(1) parsing, and summarize in JSON. | fail→pass | 11,747 | 11,504 | -2% | 1 | 1 | 0% | 2,004 | 2,924 | +46% | 0 | 0 | — |
▸case-11 Analyze an LALR(1) grammar for SQL-like query statements that exhibits a shift/reduce conflict on optional WHERE and GROUP BY clauses. Document the conflict and structure your analysis response using the JSON schema. | fail→pass | 38,353 | 27,409 | -29% | 1 | 1 | 0% | 6,579 | 5,296 | -20% | 0 | 0 | — |
▸case-12 Design a Parsing Expression Grammar (PEG) for matching nested JSON objects and arrays. Ensure syntax handles greedy matching behavior properly. Return the metadata in JSON. | fail→pass | 19,079 | 20,382 | +7% | 1 | 1 | 0% | 3,399 | 4,204 | +24% | 0 | 0 | — |
▸case-13 Formulate an EBNF grammar for variable declaration statements in a C-like language (e.g. 'const int x = 5;'). Make sure to supply concrete code examples alongside each grammar rule production. Output the metadata payload. | fail→pass | 20,465 | 34,384 | +68% | 1 | 1 | 0% | 4,245 | 6,110 | +44% | 0 | 0 | — |
▸case-14 Version 1.0 of our configuration format supports 'key = value' lines. For version 2.0, we want to add optional block sections '[section_name]' without breaking existing v1.0 configuration files. Formulate the evolved EBNF grammar and provide the structured JSON. | fail→pass | 17,646 | 12,546 | -29% | 1 | 1 | 0% | 3,698 | 2,934 | -21% | 0 | 0 | — |
▸case-15 Create an ANTLR4 grammar specification for a query language filtering logs (supporting terms like 'level = ERROR AND host = server1'). Output the analysis in the JSON schema format. | fail→pass | 17,645 | 22,400 | +27% | 1 | 1 | 0% | 3,488 | 4,016 | +15% | 0 | 0 | — |
▸case-16 Write a pure Backus-Naur Form (BNF) specification for JSON numbers including integers, fractions, and exponents. Return the grammar analysis in the structured JSON schema format. | fail→pass | 21,301 | 23,057 | +8% | 1 | 1 | 0% | 4,301 | 5,441 | +27% | 0 | 0 | — |
▸case-17 Design EBNF rules for binary operators where assignment '=' is right-associative while subtraction '-' is left-associative. Produce the formal grammar rules and the JSON output. | fail→pass | 16,193 | 10,358 | -36% | 1 | 1 | 0% | 2,432 | 2,533 | +4% | 0 | 0 | — |
▸case-18 We are defining a C++-like grammar where 'A * B;' could be a pointer variable declaration or a multiplication expression. Design this grammar for a GLR parser capable of handling non-deterministic parse trees, and return the summary JSON. | fail→pass | 12,837 | 17,033 | +33% | 1 | 1 | 0% | 2,336 | 3,758 | +61% | 0 | 0 | — |
▸case-19 Construct an EBNF grammar rule for string literals including escape sequences such as newline, quote, and unicode escapes. Provide the JSON output summary. | fail→pass | 11,033 | 9,734 | -12% | 1 | 1 | 0% | 2,433 | 2,371 | -3% | 0 | 0 | — |
▸case-20 Develop an EBNF grammar for a simple markdown list processor targeting an LL(k) parser engine. Provide the standard summary JSON. | fail→pass | 31,596 | 16,046 | -49% | 1 | 1 | 0% | 5,023 | 3,730 | -26% | 0 | 0 | — |
▸case-21 Analyze an LR grammar for an expression language with ambiguous exponentiation and unary minus operators. Identify all reduce/reduce and shift/reduce conflicts, and summarize them in the JSON payload. | fail→pass | 36,905 | 37,033 | +0% | 1 | 1 | 0% | 8,225 | 7,675 | -7% | 0 | 0 | — |
▸case-22 Generate a complete EBNF specification split across two schema files: lexer rules and parser rules for an imperative scripting language. Return the mandatory JSON summary. | fail→pass | 30,107 | 20,625 | -31% | 1 | 1 | 0% | 5,408 | 4,963 | -8% | 0 | 0 | — |
▸case-23 Design an EBNF grammar rule for function call expressions supporting zero or more comma-separated arguments, with an optional trailing comma. Include the JSON schema output. | fail→pass | 15,135 | 9,254 | -39% | 1 | 1 | 0% | 2,520 | 2,067 | -18% | 0 | 0 | — |