title: Is QML Grammar LALR(1)?
body: <p>Here is a QML grammar (extracted from <a href="https://github.com/kropp/intellij-qml/blob/master/grammars/qml.bnf" rel="nofollow noreferrer">https://github.com/kropp/intellij-qml/blob/master/grammars/qml.bnf</a>):</p>
  
  <pre><code>/* identifier, value, integer and float are terminals */
  
  qml ::= object  /* Simplified */
  
  object ::= type body
  body ::= '{' (property_definition|signal_definition|attribute_assignment|method_attribute)* '}'
  type ::= 'double'|'real'|identifier
  
  attribute_assignment ::= (attribute ':')? attribute_value ';'?
  item ::= list|object|string|boolean|number|identifier|value
  attribute_value ::= method_call|method_body|item|value+
  
  property_definition ::= 'default'? 'readonly'? 'property' ('alias'|'var'|type) property (':' attribute_value)?
  signal_definition ::= 'signal' signal ('(' (signal_parameter ',')* signal_parameter? ')')?
  signal_parameter ::= ('var'|type) parameter
  
  method_attribute ::= 'function' method '(' (parameter ',')* parameter? ')' method_body
  
  method_call ::= method '(' (argument ',')* argument? ')'
  
  method_body ::= '{' javascript '}'
  javascript ::= ('{' javascript '}'|'var'|'['|']'|'('|')'|','|':'|';'|string|identifier|number|value)*
  
  list ::= '[' item? (',' item)* ']'
  
  property ::= identifier
  attribute ::= identifier
  signal ::= identifier
  parameter ::= identifier
  method ::= identifier
  argument ::= string|boolean|number|identifier|value
  
  number ::= integer|float
  boolean ::= 'true'|'false'
  </code></pre>
  
  <p>Is it LALR(1)? My program raises a reduce/reduce conflict for the closure I[n] which contains the conflicting items:</p>
  
  <pre><code>// other items here...
  [item ::= identifier . , {]  // -&gt; ACTION[n, {] = reduce to item  
  [type ::= identifier . , {]  // -&gt; ACTION[n, {] = reduce to type  
  // other items here...
  </code></pre>