Code Monkey home page Code Monkey logo

gaze's Introduction

I'm currently working on a FLOSS knowledge graph project called Ligature and a scripting language called Wander. They are both still under heavy development, but see the websites and pinned repos for more info. Right now I'm mostly focusing on Rust code but I also have an interest in F#, Scala, TypeScript, and Kotlin.

gaze's People

Contributors

almibe avatar

Stargazers

 avatar

Watchers

 avatar  avatar

gaze's Issues

First test language: Sixes

Be able to create a language that converts a String of the character '6' to a List of integers consisting of the Int value 6.
This should also provide an error when a non-6 is found that presents both the offset and the illegal value.

figure out if/how gaze should support "skipping"

Not sure if this is actually worth doing but might be good to add back in eventually.
Maybe add a case like GazeResult::Ignore

For prosperity here's the original code using an older version of the api.

/// A Step that ignores all chars passed in.
pub struct IgnoreAll<'a>(pub HashSet<&'a str>);

impl Tokenizer<()> for IgnoreAll<'_> {
    fn attempt(&self, gaze: &mut Gaze) -> Result<(), GazeErr> {
        //TODO this will need to be rewritten once handle Unicode better
        loop {
            let next_value = gaze.peek();
            match next_value {
                None => {
                    return Ok(());
                }
                Some(c) => {
                    if self.0.contains(c) {
                        gaze.next();
                    } else {
                        return Ok(());
                    }
                }
            }
        }
    }
}

Third test language: Spaced Ints

Build off of Ints but now allow multi character ints that are split by any whitespace.

1 2 2342 2424 24241
234253463

7

should result in

List(1,2,2342,2424,24241,23425363,7)

Second test lanauge: Ints

Build on what was done with Sixes but allow for all Ints.

So "12345" should result in List(1,2,3,4,5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.