This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/macros.rs b/src/macros.rs | |
index 7ea9fbd..607ab25 100644 | |
--- a/src/macros.rs | |
+++ b/src/macros.rs | |
@@ -1712,14 +1712,27 @@ macro_rules! many1( | |
{ | |
let mut res = Vec::new(); | |
let mut input = $i; | |
- while let $crate::IResult::Done(i,o) = $submac!(input, $($args)*) { | |
- if i.len() == input.len() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate combine; | |
use combine::*; | |
use combine::primitives::Error; | |
use combine::combinator::take_while1; | |
use std::fs::File; | |
use std::env; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] | |
extern crate nom; | |
use nom::IResult; | |
use std::env; | |
use std::fs::File; | |
#[derive(Debug)] | |
struct Request<'a> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Macro emulating `do`-notation for the parser monad, automatically threading the linear type. | |
/// | |
/// ```ignore | |
/// parse!{input; | |
/// parser("parameter"); | |
/// let value = other_parser(); | |
/// | |
/// ret do_something(value); | |
/// } | |
/// // equivalent to: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
$files = glob('Templates/*.tmpl'); | |
$templates = array(); | |
foreach($files as $file) { | |
$data = file_get_contents($file); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @ORM\Entity | |
*/ | |
class User | |
{ | |
/** | |
* @ORM\String | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#include <assert.h> | |
#include <sys/mman.h> | |
typedef uint8_t Register; | |
#define Register_lowBits(r) (r & 0x7) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <inttypes.h> | |
#include <stdio.h> | |
#define Util_StaticAssert_CONCAT_(a, b) a##b | |
#define Util_StaticAssert_CONCAT(a, b) Util_StaticAssert_CONCAT_(a, b) | |
#define Util_StaticAssert(e, msg) \ | |
enum { Util_StaticAssert_CONCAT(assert_line_, __LINE__) = 1/(!!(e)) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Function to calcuate the n first fibonacci numbers */ | |
Frame *fib_frame = malloc(sizeof(Frame)); | |
Frame_init(fib_frame); | |
uint32_t prevfr = Frame_allocVariable(fib_frame); | |
/* No continuations called here, so we can get away with not allocating space for return values */ | |
uint32_t varsum = Frame_allocVariable(fib_frame); | |
uint32_t varn = Frame_allocVariable(fib_frame); | |
uint32_t vara = Frame_allocVariable(fib_frame); | |
uint32_t varb = Frame_allocVariable(fib_frame); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Created by Martin Wernståhl on 2011-04-25. | |
* Copyright (c) 2011 Martin Wernståhl. | |
* All rights reserved. | |
*/ | |
namespace Inject\Stack\Middleware; | |
use \Inject\Stack\MiddlewareInterface; |