Giter Site home page Giter Site logo

rhaseven7h / ragel-go-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from acsellers/ragel-go-examples

0.0 0.0 0.0 128 KB

I'm trying to learn how to use ragel in Go libraries. As I'm implementing things for practice I'll add them here. I'll be using Go 1.1, though the examples should work in Go 1.0 as well.

License: BSD 2-Clause "Simplified" License

Go 81.07% Ragel in Ruby Host 18.93%

ragel-go-examples's Introduction

Ragel Golang Examples

As I can't find good examples for Ragel code in Go1 style, and I'm going to be implementing a bunch of different parser type things to learn Ragel, I decided to go ahead and put my practice code up on Github for the next person to learn from (hopefully). I'm not associated with the people behind Ragel in any form.

Current Examples

All of the current code is 100% what I wrote excepting the Atoi, which was from an official ragel example, but was modified to be current Go style. I'm not sure how many examples I'm going to write, but current goal is 50. The code I use for ragel is

ragel -Z -G2 -o <name>.go <name>.rl
  • Atoi - Convert an integer in a string to an int64
  • Atof - Convert a float in a string to a float64
  • HexDecode - Convert a hex string into an int64
  • Comma - Separate a string into values like a csv

Licensing

Any code is available under the 2-clause BSD License, a copy of which is included as the file LICENSE.

ragel-go-examples's People

Contributors

acsellers avatar

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.