Start conditions are declared in the definitions (first) section of the input using unindented lines beginning with either %s
or %x
followed by a list of names. The former declares inclusive start conditions, the latter exclusive start conditions. A start condition is activated using the BEGIN action. Until the next BEGIN action is executed, rules with the given start condition will be active and rules with other start conditions will be inactive. If the start condition is inclusive, then rules with no start conditions at all will also be active. If it is exclusive, then only rules qualified with the start condition will be active. A set of rules contingent on the same exclusive start condition describe a scanner which is independent of any of the other rules in the flex input. Because of this, exclusive start conditions make it easy to specify "mini-scanners" which scan portions of the input that are syntactically different from the res
This file contains hidden or 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
/* At run-time deserialization of a protobuf buffer to a C++ object example | |
* Based on https://cxwangyi.wordpress.com/2010/06/29/google-protocol-buffers-online-parsing-of-proto-file-and-related-data-files/ | |
* @author: Floris Van den Abeele <[email protected]> | |
* | |
* Starting from a protobuf definition, main() does the following: | |
* 1) Translate protobuf definition to FileDescriptorProto object using the | |
* Parser from protoc. FileDescriptorProto seems to be nothing more than an | |
* in-memory representation of the proto definition. | |
* 2) Use a DescriptorPool to construct a FileDescriptor. FileDescriptor | |
* seems to contain all necessary meta data to describe all the members of a |
This file contains hidden or 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
package main | |
import ( | |
"bytes" | |
"log" | |
"github.com/samuel/go-thrift/thrift" | |
) | |
type testStruct struct { |
This file contains hidden or 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 | |
## | |
## Simple logging mechanism for Bash | |
## | |
## Author: Michael Wayne Goodman <[email protected]> | |
## Thanks: Jul for the idea to add a datestring. See: | |
## http://www.goodmami.org/2011/07/simple-logging-in-bash-scripts/#comment-5854 | |
## Thanks: @gffhcks for noting that inf() and debug() should be swapped, | |
## and that critical() used $2 instead of $1 |
This file contains hidden or 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
jQuery.extend = jQuery.fn.extend = function() { | |
var options, name, src, copy, copyIsArray, clone, | |
target = arguments[0] || {}, | |
i = 1, | |
length = arguments.length, | |
deep = false; | |
// Handle a deep copy situation | |
if ( typeof target === "boolean" ) { | |
deep = target; |