~jpl8/piet_interpreter

b9a5e20e3734d500415c53dc59533ded63093ea0 — jpl 1 year, 7 months ago cc045d8
Add more debug information
3 files changed, 559 insertions(+), 99 deletions(-)

A README
A src/interpreter/.rules.rs.rustfmt
M src/interpreter/rules.rs
A README => README +4 -0
@@ 0,0 1,4 @@
# A somewhat functional Piet interpreter

## Usage


A src/interpreter/.rules.rs.rustfmt => src/interpreter/.rules.rs.rustfmt +403 -0
@@ 0,0 1,403 @@
use crate::interpreter::Interpreter;
use crate::piet_img::Codel;
use std::io::{self, Error, ErrorKind, Write};

#[derive(Debug)]
pub enum Op {
    Push,
    Pop,
    Add,
    Sub,
    Mult,
    Div,
    Mod,
    Not,
    Greater,
    Pointer,
    Switch,
    Duplicate,
    Roll,
    InNum,
    InChar,
    OutNum,
    OutChar,
}

pub fn get_op(curr: &Codel, next: &Codel) -> Option<Op> {
    if let (Some(hue_diff), Some(light_diff)) = (
        curr.color().hue_diff(&next.color()),
        curr.color().light_diff(&next.color()),
    ) {
        match (hue_diff, light_diff) {
            (0, 1) => Some(Op::Push),
            (0, 2) => Some(Op::Pop),
            (1, 0) => Some(Op::Add),
            (1, 1) => Some(Op::Sub),
            (1, 2) => Some(Op::Mult),
            (2, 0) => Some(Op::Div),
            (2, 1) => Some(Op::Mod),
            (2, 2) => Some(Op::Not),
            (3, 0) => Some(Op::Greater),
            (3, 1) => Some(Op::Pointer),
            (3, 2) => Some(Op::Switch),
            (4, 0) => Some(Op::Duplicate),
            (4, 1) => Some(Op::Roll),
            (4, 2) => Some(Op::InNum),
            (5, 0) => Some(Op::InChar),
            (5, 1) => Some(Op::OutNum),
            (5, 2) => Some(Op::OutChar),
            _ => None,
        }
    } else {
        None
    }
}

pub fn do_op(interpreter: &mut Interpreter, curr: &Codel, next: &Codel) -> io::Result<()> {
    if let Some(op) = get_op(curr, next) {
        match op {
            Op::Push => {
                let block_size = curr.block_size().expect("Block size set to None!") as isize;
                interpreter.stack_as_mut().push(block_size);

                if interpreter.debug {
                    eprintln!("Executed: Push({})", block_size);
                }

                Ok(())
            }

            Op::Pop => {
                let popped = interpreter.stack_as_mut().pop();
                if interpreter.debug {
                    if let Some(v) = popped {
                        eprintln!("Executed: Pop -> {}", v);
                    } else {
                        eprintln!("Executed: Pop, but stack was empty");
                    }
                }
                Ok(())
            }

            Op::Add => {
                if interpreter.stack.len() >= 2 {
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    interpreter.stack_as_mut().push(second_pop + first_pop);

                    if interpreter.debug {
                        eprintln!(
                            "Executed: Add({}, {}) -> {}",
                            second_pop,
                            first_pop,
                            second_pop + first_pop
                        );
                    }
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }
                Ok(())
            }

            Op::Sub => {
                if interpreter.stack.len() >= 2 {
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    interpreter.stack_as_mut().push(second_pop - first_pop);

                    if interpreter.debug {
                        eprintln!(
                            "Executed: Sub({}, {}) -> {}",
                            second_pop,
                            first_pop,
                            second_pop - first_pop
                        );
                    }
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }

                Ok(())
            }

            Op::Mult => {
                if interpreter.stack.len() >= 2 {
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    interpreter.stack_as_mut().push(second_pop * first_pop);

                    if interpreter.debug {
                        eprintln!(
                            "Executed: Mult({}, {}) -> {}",
                            second_pop,
                            first_pop,
                            second_pop * first_pop
                        );
                    }
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }
                Ok(())
            }

            Op::Div => {
                if interpreter.stack.len() >= 2 {
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    if first_pop == 0 {
                        return Ok(());
                    }
                    interpreter.stack_as_mut().push(second_pop / first_pop);

                    if interpreter.debug {
                        eprintln!(
                            "Executed: Div({}, {}) -> {}",
                            second_pop,
                            first_pop,
                            second_pop / first_pop
                        );
                    }
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }
                Ok(())
            }

            Op::Mod => {
                if interpreter.stack.len() >= 2 {
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    if first_pop == 0 {
                        eprintln!("Division by zero!");
                        return Ok(());
                    }

                    interpreter.stack_as_mut().push(
                        second_pop % first_pop
                            + if second_pop % first_pop < 0 {
                                first_pop
                            } else {
                                0
                            },
                    );

                    if interpreter.debug {
                        eprintln!(
                            "Executed: Div({}, {}) -> {}",
                            second_pop,
                            first_pop,
                            second_pop / first_pop
                        );
                    }
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }
                Ok(())
            }

            Op::Not => {
                if interpreter.stack().len() > 0 {
                    let popped = interpreter.stack_as_mut().pop().unwrap();
                    let negated = if popped == 0 { 1 } else { 0 };

                    interpreter.stack_as_mut().push(negated);

                    if interpreter.debug {
                        eprintln!("Executed: Not({}) -> {}", popped, negated);
                    }
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 1",
                        interpreter.stack.len()
                    );
                }
                Ok(())
            }

            Op::Greater => {

                if interpreter.stack.len() >= 2 {
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    if first_pop == 0 {
                        return Ok(());
                    }

                    let push_val = 
                    if second_pop > first_pop {
                        1
                    } else {
                        0
                    };

                    interpreter.stack_as_mut().push(push_val);


                    if interpreter.debug {
                        eprintln!(
                            "Executed: ({}, {}) -> {}",
                            second_pop,
                            first_pop,
                            second_pop / first_pop
                        );
                    }
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }
                Ok(())
 


                if let (Some(a), Some(b)) = (first_pop, second_pop) {
                    Ok(())
                } else {
                    Err(Error::new(
                        ErrorKind::InvalidInput,
                        "Not enough values on stack!",
                    ))
                }
            }

            Op::Pointer => {
                if let Some(val) = interpreter.stack_as_mut().pop() {
                    if val < 0 {
                        for _ in 0..(-val) {
                            let new_dir = interpreter.head().direction_pointer().anticlockwise();
                            interpreter.head_as_mut().set_direction(new_dir);
                        }
                    } else {
                        for _ in 0..val {
                            let new_dir = interpreter.head().direction_pointer().clockwise();
                            interpreter.head_as_mut().set_direction(new_dir);
                        }
                    }
                }

                Ok(())
            }

            Op::Switch => {
                if let Some(val) = interpreter.stack_as_mut().pop() {
                    for _ in 0..(val.abs()) {
                        let new_dir = interpreter.head().codel_chooser().toggle();
                        interpreter.head_as_mut().set_codel_chooser(new_dir);
                    }
                }
                Ok(())
            }

            Op::Duplicate => {
                if let Some(val) = interpreter.stack_as_mut().pop() {
                    interpreter.stack_as_mut().push(val);
                    interpreter.stack_as_mut().push(val);
                }
                Ok(())
            }

            Op::Roll => {
                if interpreter.stack_as_mut().len() < 3 {
                    return Err(Error::new(
                        ErrorKind::InvalidInput,
                        "Not enough values on stack!",
                    ));
                }

                let first_pop = interpreter.stack_as_mut().pop().unwrap();
                let second_pop = interpreter.stack_as_mut().pop().unwrap();
                if second_pop < 0 {
                    // depth is negative -> ignore
                    return Ok(());
                }

                if first_pop < 0 {
                    for _ in 0..(first_pop.abs()) {
                        let front = interpreter.stack_as_mut().remove(0);
                        interpreter
                            .stack_as_mut()
                            .insert((second_pop) as usize, front);
                    }
                } else {
                    for _ in 0..first_pop {
                        let len = interpreter.stack().len();
                        let depth = if (len as isize) < second_pop {
                            return Ok(());
                        } else {
                            len - second_pop as usize
                        };
                        let third_pop = interpreter.stack_as_mut().pop().unwrap();
                        interpreter.stack_as_mut().insert(depth, third_pop);
                    }
                }
                Ok(())
            }

            Op::InNum => {
                let mut input = String::with_capacity(8);
                // Ignore errors (it's what the author recommended)
                io::stdout().flush().expect("Failed to flush to stdout!");
                if let Err(_) = io::stdin().read_line(&mut input) {
                    return Ok(());
                }
                input = input.trim().to_string();
                if let Ok(val) = input.parse::<isize>() {
                    interpreter.stack_as_mut().push(val);
                }

                Ok(())
            }

            Op::InChar => {
                let mut input = String::with_capacity(8);
                // Ignore errors (it's what the author recommended)
                io::stdout().flush().expect("Failed to flush to stdout!");
                if let Err(_) = io::stdin().read_line(&mut input) {
                    return Ok(());
                }
                input = input.trim().to_string();

                let bytes = Interpreter::get_utf8_char(&input);
                let code_point = Interpreter::utf8_to_unicode(&bytes);

                interpreter.stack_as_mut().push(code_point);

                Ok(())
            }

            Op::OutNum => {
                if let Some(val) = interpreter.stack_as_mut().pop() {
                    print!("{}", val);
                }
                Ok(())
            }

            Op::OutChar => {
                if let Some(val) = interpreter.stack_as_mut().pop() {
                    if let Some(c) = char::from_u32(val as u32) {
                        print!("{}", c);
                    }
                }
                Ok(())
            }
        }
    } else {
        Ok(())
    }
}

M src/interpreter/rules.rs => src/interpreter/rules.rs +152 -99
@@ 1,5 1,5 @@
use crate::piet_img::Codel;
use crate::interpreter::Interpreter;
use crate::piet_img::Codel;
use std::io::{self, Error, ErrorKind, Write};

#[derive(Debug)]


@@ 24,9 24,10 @@ pub enum Op {
}

pub fn get_op(curr: &Codel, next: &Codel) -> Option<Op> {

    if let (Some(hue_diff), Some(light_diff)) = (curr.color().hue_diff(&next.color()), curr.color().light_diff(&next.color())) {

    if let (Some(hue_diff), Some(light_diff)) = (
        curr.color().hue_diff(&next.color()),
        curr.color().light_diff(&next.color()),
    ) {
        match (hue_diff, light_diff) {
            (0, 1) => Some(Op::Push),
            (0, 2) => Some(Op::Pop),


@@ 45,23 46,17 @@ pub fn get_op(curr: &Codel, next: &Codel) -> Option<Op> {
            (5, 0) => Some(Op::InChar),
            (5, 1) => Some(Op::OutNum),
            (5, 2) => Some(Op::OutChar),
            _ => None

            _ => None,
        }
    } else {
        None
    }
    else { None }

}

pub fn do_op(interpreter: &mut Interpreter, curr: &Codel, next: &Codel) -> io::Result<()> {

    if let Some(op) = get_op(curr, next) {

        match op {

            Op::Push => {
                

                let block_size = curr.block_size().expect("Block size set to None!") as isize;
                interpreter.stack_as_mut().push(block_size);



@@ 77,8 72,7 @@ pub fn do_op(interpreter: &mut Interpreter, curr: &Codel, next: &Codel) -> io::R
                if interpreter.debug {
                    if let Some(v) = popped {
                        eprintln!("Executed: Pop -> {}", v);
                    }
                    else {
                    } else {
                        eprintln!("Executed: Pop, but stack was empty");
                    }
                }


@@ 87,61 81,77 @@ pub fn do_op(interpreter: &mut Interpreter, curr: &Codel, next: &Codel) -> io::R

            Op::Add => {
                if interpreter.stack.len() >= 2 {
                    let first_pop  = interpreter.stack_as_mut().pop().unwrap();
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    interpreter.stack_as_mut().push(second_pop + first_pop);
                    

                    if interpreter.debug {
                        eprintln!("Executed: Add({}, {}) -> {}", second_pop, first_pop, second_pop+first_pop);
                        eprintln!(
                            "Executed: Add({}, {}) -> {}",
                            second_pop,
                            first_pop,
                            second_pop + first_pop
                        );
                    }

                }
                else {
                    eprintln!("Not enough values on the stack! Were {}, needed 2", interpreter.stack.len());
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }
                Ok(())
            }

            Op::Sub => {
                if interpreter.stack.len() >= 2 {
                    let first_pop  = interpreter.stack_as_mut().pop().unwrap();
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    interpreter.stack_as_mut().push(second_pop - first_pop);
 

                    if interpreter.debug {
                        eprintln!("Executed: Sub({}, {}) -> {}", second_pop, first_pop, second_pop-first_pop);
                        eprintln!(
                            "Executed: Sub({}, {}) -> {}",
                            second_pop,
                            first_pop,
                            second_pop - first_pop
                        );
                    }

                }
                else { 
                    eprintln!("Not enough values on the stack! Were {}, needed 2", interpreter.stack.len());
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }

               Ok(())
                Ok(())
            }


            Op::Mult => {
                if interpreter.stack.len() >= 2 {
                    let first_pop  = interpreter.stack_as_mut().pop().unwrap();
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    interpreter.stack_as_mut().push(second_pop * first_pop);

                    if interpreter.debug {
                        eprintln!("Executed: Mult({}, {}) -> {}", second_pop, first_pop, second_pop*first_pop);
                        eprintln!(
                            "Executed: Mult({}, {}) -> {}",
                            second_pop,
                            first_pop,
                            second_pop * first_pop
                        );
                    }
                }
                else { 
                    eprintln!("Not enough values on the stack! Were {}, needed 2", interpreter.stack.len());
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }
                Ok(())

            }


            Op::Div => {
                if interpreter.stack.len() >= 2 {
                    let first_pop  = interpreter.stack_as_mut().pop().unwrap();
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    if first_pop == 0 {
                        return Ok(());


@@ 149,39 159,59 @@ pub fn do_op(interpreter: &mut Interpreter, curr: &Codel, next: &Codel) -> io::R
                    interpreter.stack_as_mut().push(second_pop / first_pop);

                    if interpreter.debug {
                        eprintln!("Executed: Div({}, {}) -> {}", second_pop, first_pop, second_pop/first_pop);
                        eprintln!(
                            "Executed: Div({}, {}) -> {}",
                            second_pop,
                            first_pop,
                            second_pop / first_pop
                        );
                    }
                }
                else { 
                    eprintln!("Not enough values on the stack! Were {}, needed 2", interpreter.stack.len());
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }
                Ok(())
            }

            Op::Mod => {
                if interpreter.stack.len() >= 2 {
                let first_pop  = interpreter.stack_as_mut().pop().unwrap();
                let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    if first_pop == 0 {
                        eprintln!("Division by zero!");
                        return Ok(()); 
                        return Ok(());
                    }

                    interpreter.stack_as_mut().push(second_pop % first_pop + if second_pop%first_pop < 0 { first_pop } else { 0 });
                    interpreter.stack_as_mut().push(
                        second_pop % first_pop
                            + if second_pop % first_pop < 0 {
                                first_pop
                            } else {
                                0
                            },
                    );

                    if interpreter.debug {
                        eprintln!("Executed: Div({}, {}) -> {}", second_pop, first_pop, second_pop/first_pop);
                        eprintln!(
                            "Executed: Div({}, {}) -> {}",
                            second_pop,
                            first_pop,
                            second_pop / first_pop
                        );
                    }
                }
                else { 
                    eprintln!("Not enough values on the stack! Were {}, needed 2", interpreter.stack.len());
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }
                Ok(())

            }

            Op::Not => {
                if interpreter.stack().len() > 0 { 
                if interpreter.stack().len() > 0 {
                    let popped = interpreter.stack_as_mut().pop().unwrap();
                    let negated = if popped == 0 { 1 } else { 0 };



@@ 190,62 220,81 @@ pub fn do_op(interpreter: &mut Interpreter, curr: &Codel, next: &Codel) -> io::R
                    if interpreter.debug {
                        eprintln!("Executed: Not({}) -> {}", popped, negated);
                    }
                    
                }
                else {
                    eprintln!("Not enough values on the stack! Were {}, needed 1", interpreter.stack.len());
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 1",
                        interpreter.stack.len()
                    );
                }
                Ok(())
            }

            Op::Greater => {
                let first_pop  = interpreter.stack_as_mut().pop();
                let second_pop = interpreter.stack_as_mut().pop();
                if let (Some(a), Some(b)) = (first_pop, second_pop) {
                    if b > a { interpreter.stack_as_mut().push(1) } else { interpreter.stack_as_mut().push(0) }
                    Ok(())
                }
                else { 
                    Err(Error::new(ErrorKind::InvalidInput, "Not enough values on stack!"))
                }
                if interpreter.stack.len() >= 2 {
                    let first_pop = interpreter.stack_as_mut().pop().unwrap();
                    let second_pop = interpreter.stack_as_mut().pop().unwrap();
                    if first_pop == 0 {
                        return Ok(());
                    }

                    let push_val = if second_pop > first_pop { 1 } else { 0 };

                    interpreter.stack_as_mut().push(push_val);

                    if interpreter.debug {
                        eprintln!(
                            "Executed: Greater({}, {}) -> {}",
                            second_pop, first_pop, push_val,
                        );
                    }
                } else {
                    eprintln!(
                        "Not enough values on the stack! Were {}, needed 2",
                        interpreter.stack.len()
                    );
                }
                Ok(())
            }

            Op::Pointer => {
                if let Some(val) = interpreter.stack_as_mut().pop() {
                    if interpreter.debug() {
                        eprintln!("Executed: Pointer({})", val);
                    }
                    if val < 0 {
                        for _ in 0..(-val) {
                            let new_dir = interpreter.head().direction_pointer()
                                                     .anticlockwise();
                            let new_dir = interpreter.head().direction_pointer().anticlockwise();
                            interpreter.head_as_mut().set_direction(new_dir);
                        }
                    }
                    else {
                    } else {
                        for _ in 0..val {
                            let new_dir = interpreter.head().direction_pointer()
                                                     .clockwise();
                            let new_dir = interpreter.head().direction_pointer().clockwise();
                            interpreter.head_as_mut().set_direction(new_dir);
                        }
                    }
                }

                Ok(())

            }

            Op::Switch => {
                if let Some(val) = interpreter.stack_as_mut().pop() {
                    if interpreter.debug() {
                        eprintln!("Executed: Switch({})", val);
                    }
                    for _ in 0..(val.abs()) {
                        let new_dir = interpreter.head().codel_chooser().toggle();
                        interpreter.head_as_mut().set_codel_chooser(new_dir);
                    }
                }
                Ok(())

            }

            Op::Duplicate => {
                if let Some(val) = interpreter.stack_as_mut().pop() {
                    if interpreter.debug() {
                        eprintln!("Executed: Duplicate({})", val);
                    }
                    interpreter.stack_as_mut().push(val);
                    interpreter.stack_as_mut().push(val);
                }


@@ 254,37 303,40 @@ pub fn do_op(interpreter: &mut Interpreter, curr: &Codel, next: &Codel) -> io::R

            Op::Roll => {
                if interpreter.stack_as_mut().len() < 3 {
                    return Err(Error::new(ErrorKind::InvalidInput, "Not enough values on stack!"));
                    return Err(Error::new(
                        ErrorKind::InvalidInput,
                        "Not enough values on stack!",
                    ));
                }

                let first_pop  = interpreter.stack_as_mut().pop().unwrap();
                let first_pop = interpreter.stack_as_mut().pop().unwrap();
                let second_pop = interpreter.stack_as_mut().pop().unwrap();

                if second_pop < 0 {
                        // depth is negative -> ignore
                        return Ok(());
                    }
                    // depth is negative -> ignore
                    return Ok(());
                }

                if first_pop < 0 {
                   for _ in 0..(first_pop.abs()) {
                       let front = interpreter.stack_as_mut().remove(0);
                       interpreter.stack_as_mut().insert((second_pop) as usize, front);
                   }
                }
                else { 
                    for _ in 0..(first_pop.abs()) {
                        let front = interpreter.stack_as_mut().remove(0);
                        interpreter
                            .stack_as_mut()
                            .insert((second_pop) as usize, front);
                    }
                } else {
                    for _ in 0..first_pop {
                        let len = interpreter.stack().len();
                        let depth = if (len as isize) < second_pop { 
                        let depth = if (len as isize) < second_pop {
                            return Ok(());
                        }
                        else {
                            len - second_pop  as usize
                        } else {
                            len - second_pop as usize
                        };
                        let third_pop  = interpreter.stack_as_mut().pop().unwrap();
                        let third_pop = interpreter.stack_as_mut().pop().unwrap();
                        interpreter.stack_as_mut().insert(depth, third_pop);
                    }
                }
                Ok(())

            }

            Op::InNum => {


@@ 321,26 373,27 @@ pub fn do_op(interpreter: &mut Interpreter, curr: &Codel, next: &Codel) -> io::R

            Op::OutNum => {
                if let Some(val) = interpreter.stack_as_mut().pop() {
                        print!("{}", val);
                    if interpreter.debug() {
                        eprintln!("Executed: OutNum({})", val);
                    }
                    print!("{}", val);
                }
                Ok(())
            }

            Op::OutChar => {

                if let Some(val) = interpreter.stack_as_mut().pop() {
                    if let Some(c) = char::from_u32(val as u32) {
                        if interpreter.debug() {
                            eprintln!("Executed: OutChar({} = {})", val, c);
                        }
                        print!("{}", c);
                    }
                }
                Ok(())
            }

        }

    } else {
        Ok(())
    }
    else { Ok(()) }


}