Function opg::find_eq [−][src]
pub(crate) fn find_eq(
table: &mut OpTable,
productions: &Vec<Production>,
nts: &HashSet<String>
)
Find the equal operators
Input
table
the mutable OpTable
struct for output
productions
the vector of struct Production
nts
the non-terminal set, which could be generated
from the function get_non_terminals()
.
Example
find_eq(&mut table, &productions, &nts);
Principles
Search the pattern of ..T1..T2.. and make T1=T2, notice that it is NOT indicate that T2=T1.