Allow parsing from String on top of FILE* #15

Closed
nddrylliog opened this Issue Nov 28, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@nddrylliog
Member

nddrylliog commented Nov 28, 2012

Currently nagaqueen (and thus, (lib)rock) only allows parsing from a file, which means anything that uses rock's AST would first need to write to a temporary file, then ask librock to parse it, and that kinda sucks.

The main problems are here in nq_parse https://github.com/nddrylliog/nagaqueen/blob/df587b8acbc224930688a5a067c9a3cf9529b49a/grammar/nagaqueen.leg#L1544 (this only takes a path to a file) and of couse in yyInput: https://github.com/nddrylliog/nagaqueen/blob/df587b8acbc224930688a5a067c9a3cf9529b49a/grammar/nagaqueen.leg#L82

If we could have some additional state that tells us if we're reading from a file or from memory, it'd be possible to read in-memory ooc code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment