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
「int main(int x) { return x; }」 | |
function-definition => 「int main(int x) { return x; }」 | |
declaration-specifiers => 「int 」 | |
declaration-specifier => 「int 」 | |
type-specifier => 「int 」 | |
sym => 「int」 | |
declarator => 「main(int x) 」 | |
direct-declarator => 「main(int x) 」 | |
direct-declarator-first => 「main」 | |
ident => 「main」 |
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
use v6; | |
module C::CAST; | |
class TranslationUnit { | |
has ExternalDeclaration @decls; | |
} | |
class ExternalDeclaration { | |
} |
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
unsigned clang_visitChildrenWithPost(CXCursor parent, | |
CXCursorVisitor visitor, | |
CXPostChildrenVisitor post_visitor, | |
CXClientData client_data) { | |
clang::cxcursor::CursorVisitor CursorVis(clang_Cursor_getTranslationUnit(parent), visitor, client_data, | |
/*VisitPreprocessorLast=*/false, | |
/*VisitIncludedPreprocessingEntries=*/false, | |
/*RegionOfInterest=*/clang::SourceRange(), | |
/*VisitDeclsOnly=*/false, | |
/*PostChildrenVisitor=*/post_visitor); |
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
fn unwords(args: &[~str]) -> ~str { | |
return str::connect(args, " "); | |
} | |
fn echo(args: &[~str]) { | |
match args.tail() { | |
[~"-n", ..strs] => print(unwords(strs)), | |
strs => println(unwords(strs)), | |
} | |
} |
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 mod extra; | |
use extra::getopts::*; | |
pub struct Total { | |
lines: uint, | |
words: uint, | |
chars: uint, | |
bytes: uint | |
} | |
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
;; Default font | |
(set-default-font "unifont-16") | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(default ((t ( | |
:family "unifont" | |
:background "White" |
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
#!/bin/bash | |
#set config(0) {{- 0} -1 56 -1 56} | |
#set config(1) {{- 1} 47 75 47 75} | |
#set config(2) {{- 2} 65 128 65 128} | |
## config | |
I8KCTL_FAN="i8kctl fan" | |
I8KCTL_TEMP="i8kctl temp" |
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 webclient; | |
use std::io::Reader; | |
use std::io::stdin; | |
use webclient::digest::types::HashAlgorithm; | |
pub fn hash_algorithm_from_lower(name: &str) -> Option<Box<HashAlgorithm+'static>> { | |
match name { | |
"-md5" => Some(box webclient::digest::md5::md5_new() as Box<HashAlgorithm>), | |
"-sha1" => Some(box webclient::digest::sha1::sha1_new() as Box<HashAlgorithm>), |
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 getopts; | |
use std::io::File; | |
use std::path::Path; | |
use getopts::optflag; | |
pub struct Total { | |
lines: uint, | |
words: uint, | |
chars: uint, | |
bytes: uint |
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
trait Mappable | |
{ | |
type A; | |
type B; | |
type M<A> where M<A> = Self; | |
type M<B>; | |
fn map<A, B>(self, f: A -> B) -> M<B>; | |
} |