StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
4 years ago | |
---|---|---|
.. | ||
lib | 4 years ago | |
node_modules | 4 years ago | |
.travis.yml | 4 years ago | |
LICENSE.md | 4 years ago | |
README.md | 4 years ago | |
index.js | 4 years ago | |
package.json | 4 years ago | |
stream.js | 4 years ago | |
string.js | 4 years ago |
README.md
glsl-tokenizer 
Maps GLSL string data into GLSL tokens, either synchronously or using a streaming API.
var tokenString = require('glsl-tokenizer/string')
var tokenStream = require('glsl-tokenizer/stream')
var fs = require('fs')
// Synchronously:
var tokens = tokenString(fs.readFileSync('some.glsl'))
// Streaming API:
fs.createReadStream('some.glsl')
.pipe(tokenStream())
.on('data', function(token) {
console.log(token.data, token.position, token.type)
})
API
tokens = require('glsl-tokenizer/string')(src, [opt])
Returns an array of tokens
given the GLSL source string src
You can specify opt.version
string to use different keywords/builtins, such as '300 es'
for WebGL2. Otherwise, will assume GLSL 100 (WebGL1).
var tokens = tokenizer(src, {
version: '300 es'
})
stream = require('glsl-tokenizer/stream')([opt])
Emits 'data' events whenever a token is parsed with a token object as output.
As above, you can specify opt.version
.
Tokens
{ 'type': TOKEN_TYPE
, 'data': "string of constituent data"
, 'position': integer position within the GLSL source
, 'line': line number within the GLSL source
, 'column': column number within the GLSL source }
The available token types are:
block-comment
:/* ... */
line-comment
:// ... \n
preprocessor
:# ... \n
operator
: Any operator. If it looks like punctuation, it's an operator.float
: Optionally suffixed withf
ident
: User defined identifier.builtin
: Builtin function.eof
: Emitted onend
; data will ==='(eof)'
.integer
whitespace
keyword
License
MIT, see LICENSE.md for further information.