<commit_before>/* Copyright Dec 7, 2003 <NAME>, all rights reserved.
 */
package org.jmock.examples.calculator;

import java.io.IOException;

/**
 * Grammar:
 * <pre>
 *  expr = add_expr
 *  add_expr = mul_expr ("+" add_expr | "-" add_expr)*
 *  mul_expr = mul_expr ("*" pow_expr | "/" pow_expr)*
 *  pow_expr = val_expr ("^" pow_expr)*
 *  val_expr = number | varref | funcall | "(" expr ")"
 *  number ~= [0-9]+\.[0-9]+
 *  varref = identifier
 *  funcall = identifier "(" expr_list ")"
 *  expr_list = expr ("," expr)*
 * </pre>
 */

public class InfixParser implements Parser {<commit_msg>Corrected the grammar in the javadoc comment<commit_after>/* Copyright Dec 7, 2003 <NAME>, all rights reserved.
 */
package org.jmock.examples.calculator;

import java.io.IOException;

/**
 * A recursive descent parser for the following grammar:
 * <pre>
 *  expr = add_expr
 *  add_expr = mul_expr ("+" add_expr | "-" add_expr)*
 *  mul_expr = mul_expr ("*" pow_expr | "/" pow_expr)*
 *  pow_expr = val_expr ("^" pow_expr)*
 *  val_expr = number | varref | "(" expr ")"
 *  number ~= [0-9]+\.[0-9]+
 *  varref = identifier
 *  expr_list = expr ("," expr)*
 * </pre>
 */
public class InfixParser implements Parser {
{'fraction_non_alphanumeric': 0.17466887417218543, 'fraction_numerical': 0.014900662251655629, 'mean_word_length': 3.5795454545454546, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1091528', 'n_tokens_mistral': 443, 'n_tokens_neox': 424, 'n_words': 107}