parser-combinators Questions
3
Solved
We have a multithreaded RPC server that parses input strings. We've run into an issue where Scala's parser combinator library is not multithreaded safe: the var lastNoSuccess in Parsers.scala is us...
Brougham asked 6/5, 2011 at 3:22
4
Solved
I wondering if it's possible to get the MatchData generated from the matching regular expression in the grammar below.
object DateParser extends JavaTokenParsers {
....
val dateLiteral = """(\...
Parapsychology asked 29/11, 2009 at 14:49
4
Solved
Around 6 years ago, I benchmarked my own parser combinators in OCaml and found that they were ~5× slower than the parser generators on offer at the time. I recently revisited this subject and ...
Phial asked 30/12, 2010 at 1:46
2
Solved
Im trying to match this syntax:
pgm ::= exprs
exprs ::= expr [; exprs]
expr ::= ID | expr . [0-9]+
My scala packrat parser combinator looks like this:
import scala.util.parsing.combinator.Packr...
Heidt asked 27/7, 2010 at 12:42
2
I've coded a parser based on Scala parser combinators:
class SxmlParser extends RegexParsers with ImplicitConversions with PackratParsers {
[...]
lazy val document: PackratParser[AstNodeDocument...
Lor asked 25/5, 2010 at 16:52
1
Solved
Given a family of objects that implement parser combinators, how do I combine the parsers? Since Parsers.Parser is an inner class, and in Scala inner classes are bound to the outer object, the stor...
Churchill asked 16/4, 2010 at 2:42
2
I have read that Haskell parser combinators (in Parsec) can parse context sensitive grammars. Is this also true for Scala parser combinators? If so, is this what the "into" (aka ">>") functio...
Floweret asked 13/3, 2010 at 7:15
2
Solved
I am creating a DSL, and using Scala's parser combinator library to parse the DSL. The DSL follows a simple, Ruby-like syntax. A source file can contain a series of blocks that look like this:
cre...
Adjunct asked 4/3, 2010 at 20:54
1
Solved
I'm trying to define a grammar for the commands below.
object ParserWorkshop {
def main(args: Array[String]) = {
ChoiceParser("todo link todo to database")
ChoiceParser("todo link todo to datab...
Detention asked 25/11, 2009 at 17:50
6
Solved
I'm wondering if Scalas/Haskells parser combinators are sufficient for parsing a programming language. More specifically the language MiniJava. I'm currently reading compiller construction and jfle...
Rhapsodic asked 28/1, 2009 at 22:51
1
Solved
I have the following EBNF that I want to parse:
PostfixExp -> PrimaryExp ( "[" Exp "]"
| . id "(" ExpList ")"
| . length )*
And this is what I got:
def postfixExp: Parser[Expression] = (...
Dotard asked 8/2, 2009 at 16:19
© 2022 - 2024 — McMap. All rights reserved.