Sha256: cea63df4aa9b07eaf858dcef3889f3cfd068b31508f15ea104bc5bb6d25d736e
Contents?: true
Size: 1.69 KB
Versions: 5
Compression:
Stored size: 1.69 KB
Contents
2 * 3 + (1 + 3 ** 2) Concrete Syntax Tree (CST) ========================== expression +-- simple_expression +-- simple_expression | +-- term | +-- term | | +-- factor | | +-- simple_factor | | +-- sign | | +-- NUMBER: '2' | +-- mul_operator | | +-- STAR: '*' | +-- factor | +-- simple_factor | +-- sign | +-- NUMBER: '3' +-- add_operator | +-- PLUS: '+' +-- term +-- factor +-- simple_factor +-- LPAREN: '(' +-- expression | +-- simple_expression | +-- simple_expression | | +-- term | | +-- factor | | +-- simple_factor | | +-- sign | | +-- NUMBER: '1' | +-- add_operator | | +-- PLUS: '+' | +-- term | +-- factor | +-- simple_factor | | +-- sign | | +-- NUMBER: '3' | +-- POWER: '**' | +-- simple_factor | +-- sign | +-- NUMBER: '2' +-- RPAREN: ')' Abstract Syntax Tree (AST) ========================== PLUS +-- STAR | +-- NUMBER: '2' | +-- NUMBER: '3' +-- PLUS +-- NUMBER: '1' +-- POWER +-- NUMBER: '3' +-- NUMBER: '2' Result: ======= 16
Version data entries
5 entries across 5 versions & 1 rubygems