Parsby – Parser combinator library for Ruby, based on Haskell's Parsec github.com/jolmg/parsby
πŸ‘︎ 45
πŸ’¬︎
πŸ‘€︎ u/jolmg
πŸ“…︎ Sep 28 2020
🚨︎ report
How to design Parsec parsers for good error reporting

Consider this parser for dot separated integers

import Text.Parsec as T.P
import Text.Parsec.Char
import Control.Monad

dottedint :: Parsec String () [Int]
dottedint = map read <$> sepBy1 num (char '.')
  where num = liftM (:[]) (char '0') <|> liftM2 (:) nzdigit (many digit)

nzdigit :: Parsec String () Char
nzdigit = satisfy (`elem` ['1'..'9']) <?> "non-zero digit"

which accepts dotted decimals where the numbers have no redundant zeroes.

The parsing works as expected but I'm not satisfied with the parsing errors:

> parseTest (dottedint <* eof) "1.."
parse error at (line 1, column 3):
unexpected "."
expecting "0" or non-zero digit

This isn't wrong but I'd prefer this to simply say

expecting digit
> parseTest (dottedint <* eof) "1.1a"
parse error at (line 1, column 4):
unexpected 'a'
expecting "." or end of input

This is more serious as it omits that a "digit" would be acceptable too. In other words I expected

expecting digit or "." or end of input

Can somebody explain to me how parsec computes the set of expected tokens as well as how to modify the parsec parser example above to address the two issues?

πŸ‘︎ 25
πŸ’¬︎
πŸ‘€︎ u/ACabalSupreme
πŸ“…︎ Feb 28 2019
🚨︎ report
Arcsecond: A JavaScript Parser-Combinator Library Based On Haksell's Parsec medium.com/@FrancisStokes…
πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/FrancisStokes
πŸ“…︎ Dec 27 2018
🚨︎ report
readcsv: Lightweight CSV parser/emitter without parsec dependency (Uses ReadP from base). hackage.haskell.org/packa…
πŸ‘︎ 35
πŸ’¬︎
πŸ‘€︎ u/gtsteel
πŸ“…︎ Feb 23 2017
🚨︎ report
After some failed attempts to learn Parsec I came across this incredibly patient tutorial and now I'm writing parsers! github.com/JakeWheat/intr…
πŸ‘︎ 86
πŸ’¬︎
πŸ‘€︎ u/rdfox
πŸ“…︎ Oct 04 2014
🚨︎ report
parser-combinators: A Parser combinator library based on parsec

I have been working on this library for a while but I think it is now working to a point where others may get some us of it. Everything is still to be considered unstable for now though so expect breakage if you end up using it.

The library is exactly what it says on the box, it provides parser combinators which is, if you don't know, a simple way of writing (LL(1)) parsers by combining simple parsers into more advanced ones. It is based on the Haskell library parsec though internally it is quite different. On the user side this will mostly be noticed through the use distinct types for each parser (similar to how iterators work) which should allow for efficient static dispatch at the expense of compilation time.

The library has been on github for a while but I also uploaded to crates.io so that it would be easy get if someone wanted to try it out.

Questions or suggestions for improvement are welcome!

Github Crates.io

πŸ‘︎ 21
πŸ’¬︎
πŸ‘€︎ u/Marwes
πŸ“…︎ Jan 26 2015
🚨︎ report
Parsec β€” async body parser for Node.js

npm: https://www.npmjs.com/package/body-parsec (cos parsec is reserved)

github: https://github.com/talentlessguy/parsec

parsec

I have written a body parser that accepts form / json / raw / text data and can be easily used with Express as a middleware. Also, it can be used with built-in http server. I know that there are body and co-body already, but they have extra dependencies and I wanted to make something between Express body-parser and co-body, not too primitive but at the same time not too huge. Package is in development but can be used for simple tasks, such as parsing text forms.

Features

  • async βŒ›
  • JSON / raw / form / text data support ⏩
  • tiny package size (750 b) πŸ“¦
  • no dependencies 🎊
  • filter requests (only POST, PUT and PATCH) β˜”

TODO

  • Accept multipart data
  • Somehow integrate to koa (await next() doesn't want to work)
  • Add HTTP headers for requests (e.g. application/json for parsec.json)

Please send some feedback or critics here.

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/talentlessguy
πŸ“…︎ Jun 12 2019
🚨︎ report
how to tell whether Parsec parser uses constant heap space

A week ago I asked a question on Stack Overflow about writing a Parsec parser that uses constant heap space. It didn't receive any answers, but it did receive a comment that made me think I'm misunderstanding something fundamental. I would really appreciate it if anyone had any hints as to where I might be going wrong. Or even just pointers to papers/blog posts with more information.

I've reproduced the question below for ease of viewing.


I wrote the following function:

manyLength
  :: forall s u m a. ParsecT s u m a -> ParsecT s u m Int
manyLength p = go 0
  where
    go :: Int -> ParsecT s u m Int
    go !i = (p *> go (i + 1)) <|> pure i

This function is similar to many. However, instead of returning [a], it returns the number of times it was able to successfully run the parser p.

This works well, except for one problem. It doesn't run in constant heap space.

Here's an alternative way of writing manyLength that does run in constant heap space:

manyLengthConstantHeap
  :: forall s u m a. ParsecT s u m a -> ParsecT s u m Int
manyLengthConstantHeap p = go 0
  where
    go :: Int -> ParsecT s u m Int
    go !i =
      ((p *> pure True) <|> pure False) >>=
        \success -> if success then go (i+1) else pure i

This is a significant improvement, but I don't understand why manyLengthConstantHeap uses constant heap space, while my original manyLength doesn't.

If you inline (<|>) in manyLength, it looks somewhat like this:

manyLengthInline
  :: forall s u m a. Monad m => ParsecT s u m a -> ParsecT s u m Int
manyLengthInline p = go 0
  where
    go :: Int -> ParsecT s u m Int
    go !i =
      ParsecT $ \s cok cerr eok eerr ->
        let meerr :: ParserError -> m b
            meerr err =
              let neok :: Int -> State s u -> ParserError -> m b
                  neok y s' err' = eok y s' (mergeError err err')
                  neerr :: ParserError -> m b
                  neerr err' = eerr $ mergeError err err'
              in unParser (pure i) s cok cerr neok neerr
... keep reading on reddit ➑

πŸ‘︎ 15
πŸ’¬︎
πŸ‘€︎ u/cdep_illabout
πŸ“…︎ Apr 06 2017
🚨︎ report
parsec.el: Parser Combinator Library for Emacs Lisp, Similar to Haskell's Parsec github.com/cute-jumper/pa…
πŸ‘︎ 30
πŸ’¬︎
πŸ‘€︎ u/cutejumper
πŸ“…︎ Jul 16 2016
🚨︎ report
ParsecJ – Java Monadic Parser Framework (port of Haskell’s Parsec library) github.com/jon-hanson/par…
πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/jonhanson
πŸ“…︎ Feb 06 2015
🚨︎ report
A handy function for debugging in Parsec by what printing a parser is currently seeing.

Since Parsec is quite procedural in how it consumes characters, it is easy to mis-parse input by eating too many or too few characters. In those cases having a function like this that outputs the current state of the input stream is useful:

seeNext :: Int -> ParsecT String u Identity ()
seeNext n = do
  s <- getParserState
  let out = take n (stateInput s)
  println out

Here's a full program that shows usage:

import Text.Parsec
import Text.Parsec.Prim
import Debug.Trace
import Data.Functor.Identity

println msg = trace (show msg) $ return ()

seeNext :: Int -> ParsecT String u Identity ()
seeNext n = do
  s <- getParserState
  let out = take n (stateInput s)
  println out

betweenBraces = char '{' >> manyTill (seeNext 10 >> anyChar) (char '}')

test = parseTest betweenBraces "{12345}"

{-
> test
"12345}"
"2345}"
"345}"
"45}"
"5}"
"12345"
-}
πŸ‘︎ 19
πŸ’¬︎
πŸ‘€︎ u/deech
πŸ“…︎ Jul 25 2015
🚨︎ report
Monadic Parsers: Implementing a micro Parsec olenhad.me/articles/monad…
πŸ‘︎ 12
πŸ’¬︎
πŸ‘€︎ u/olenhad
πŸ“…︎ Jun 04 2014
🚨︎ report
Parsec - Avoid post processing and let sub parsers unaware of parent parsers

Hi.

In the following gist, I resumed a few issues I have with parsec and I'm sure you can help me to find a cleaner solution:

https://gist.github.com/guibou/509c3537f3a9e256296b

My issues are two-fold. First, I'm trying to parse lines such as "Hello I can contain *bold* content". This is resumed as:

data LineContent = Bold String | RawText String

anyItem :: Parser LineContent
anyItem = RawText . (:[]) <$> anyChar

bold :: Parser LineContent
bold = Bold <$> (char '*' *> manyTill anyChar (char '*'))

untilEol :: Parser [LineContent]
untilEol = manyTill (choice [bold, anyItem]) (string "\n")

However I'm not satisfied because I get one RawText per char instead of many char in a RawText. I wanted to write:

anyItem = RawText <$> (many anyChar)

but this does not work because anyItem can consume a bold sequence.

My second issue is that I have the feeling that most parser must know their surrounding and context to work. The syntax I'm trying to parse is composed of block starting with a pattern ("Q. " or "A. ") and followed by many lines. Currently I have something such as :

parseBlock = string "Q. " *&gt; many lines

lines = notFollowedBy (choice [string "A. ", string "Q. "])
   *&gt; manyTill anyChar (string "\n")

I'm not satisfied because any new block will force an update and the lines parser.

Thank you.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/guibou
πŸ“…︎ Nov 08 2015
🚨︎ report
Advice on writing efficient Parsec parsers?

Hello,

Does anyone have a link handy to a tutorial on writing efficient Parsec parsers? I have a parser (part of the External Core library, for anyone who cares) that's using a huge amount of memory, and I'm not sure where to start in improving the code. I know the advice to avoid backtracking as much as possible, and the parser certainly does make heavy use of backtracking, but I'm not sure where to begin. I don't expect a code critique here, but any links to general advice would be more than welcome. Googling didn't turn up much, nor did searching the haskell-cafe archives.

I'm using Parsec 2.1.0.1, fwiw.

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/catamorphism
πŸ“…︎ Apr 27 2010
🚨︎ report
FParsec - A Parser Combinator Library for F# (Based on Haskell's Parsec) quanttec.com/fparsec/
πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/martinbishop
πŸ“…︎ Jan 05 2008
🚨︎ report
A simple JSON parser written in Haskell using Parsec hvergi.net/2008/06/parsin…
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/arnar
πŸ“…︎ Jun 26 2008
🚨︎ report
Parsimony is a generalized and simplified version of the industrial-strength parser combinator library Parsec hackage.haskell.org/packa…
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/dons
πŸ“…︎ Sep 07 2009
🚨︎ report
Building a toy compiler in Haskell, what kind of parser should I be using?

I was wondering whether it would be better to use a hand written recursive descent parser or write my own parser combinator library. What are the pros and cons of each?

Thanks!

πŸ‘︎ 41
πŸ’¬︎
πŸ‘€︎ u/shafinlearns2jam
πŸ“…︎ Jan 04 2022
🚨︎ report
Parsec: ES6-ready CLI parser in 150 LOC git.io/parsec
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/bucaran
πŸ“…︎ Jun 04 2015
🚨︎ report
sql parser using parsec launchpad.net/hssqlppp
πŸ‘︎ 14
πŸ’¬︎
πŸ‘€︎ u/jakewheat
πŸ“…︎ Aug 18 2009
🚨︎ report
Haskell: Parsec Parser Testing with QuickCheck lstephen.wordpress.com/20…
πŸ‘︎ 18
πŸ’¬︎
πŸ‘€︎ u/linuxer
πŸ“…︎ Jul 30 2007
🚨︎ report
simple parser in haskell, (no parsec,alex/happy) hackification.com/2010/11…
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/gtani7
πŸ“…︎ Nov 17 2010
🚨︎ report
Parsec monadic parser ported to Clojure github.com/jasonjckn/clar…
πŸ‘︎ 12
πŸ’¬︎
πŸ‘€︎ u/mac
πŸ“…︎ Jun 05 2011
🚨︎ report
Parsec, a fast combinator parser cs.uu.nl/~daan/download/p…
πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/cavedave
πŸ“…︎ Feb 28 2007
🚨︎ report
Parsec Parser Testing with QuickCheck lstephen.wordpress.com/20…
πŸ‘︎ 12
πŸ’¬︎
πŸ‘€︎ u/dons
πŸ“…︎ Sep 06 2009
🚨︎ report
C# vs F# for parser combinators

I have to write some DSL language in .NET and as I know Parsec from Haskell, I decided to find alternative in c#/f#. I've tried language-ext.Parsec because it's kinda popular, not abandoned and also because I don't know f#, but I didn't enjoy lack of expression in c# syntax - there are no custom operators, functions are with parentheses so even function composition starts to look like a lisp.

Should I try F#? Are there any good, not abandoned years ago, parsec-like libraries?

πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/bananchick_pasha
πŸ“…︎ Jan 03 2022
🚨︎ report
Getting a result from Parsec

Hello everyone, Im a bit late but I am still working on AoC 2021.

I am currently at day 16, which was involves some parsing of binary data.
I thought that this is easily done with some data types and Parsec, however I am stuck on one thing:

I have an ADT:
data Type = Literal Int | Operator [Packet]

and I am parsing a group of 5 bits with some simple Parsec stuff (anyChar) and a parser with this signature:
groupParser :: ParsecT String u Identity String

The String part however is actually a binary number, which I now want to feed into the Literal constructor:pure $ Literal groupParser

This obviously won't work, since its a type mismatch... Even if you do this:

Literal (binToDec &lt;$&gt; groupParser) (where binToDec :: String -&gt; Int)

it won't work since its not an Int...

Is there any way to get the Int out of the ParsecT? I know monads normally don't work like this (they're well defined) but since I know my input is safe id like to just get the Int there...
Even if the input is not safe a Maybe Int would work....

But I seem to miss some trick/idea to translate what I had into mind into working Haskell code...

So: Is there any way to directly parse the input via the groupParser to an Int or do I have to rethink the way I implement my data types?

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/mathiscool42
πŸ“…︎ Jan 05 2022
🚨︎ report
Announcing Parcel CSS: A new CSS parser, compiler, and minifier written in Rust! parceljs.org/blog/parcel-…
πŸ‘︎ 487
πŸ’¬︎
πŸ‘€︎ u/Morhaus
πŸ“…︎ Jan 12 2022
🚨︎ report
clap 3.0, a Rust CLI argument parser epage.github.io/blog/2021…
πŸ‘︎ 723
πŸ’¬︎
πŸ‘€︎ u/epage
πŸ“…︎ Dec 31 2021
🚨︎ report
BREAKING!! NPM package β€˜ua-parser-js’ with more than 7M weekly download is compromised github.com/faisalman/ua-p…
πŸ‘︎ 4k
πŸ’¬︎
πŸ‘€︎ u/Incredble8
πŸ“…︎ Oct 22 2021
🚨︎ report
Top Warrior Parser in SoM Has Zero PvP Gear

Remember when everyone said you needed to hit rank 14 if you wanted to compete in SoM?

https://vanilla.warcraftlogs.com/character/eu/dreadnaught/ytal

Laty is running 21/30/0 spec to get death wish, sweeping strikes, improved slam, and flurry... he's using a two-hander, even on single target fights... and he has exactly zero PvP gear equipped.

The only caveat is that this strategy works much better on horde. Laty is filling his extra global cooldowns with hamstring, which has a chance to proc windfury in classic. You can see on this top Ragnaros parse that he used hamstring 17 times, which would give him an average of 3.4 extra melee swings over the course of the fight that an alliance warrior could never get. The increased rage generation from windfury also allows for more slams and whirlwinds than an alliance warrior, although that's harder to quantify.

It remains to be seen if this strategy continues to be useful on BWL bosses, which have less adds than Molten Core bosses. But given his performance on even some of the pure single target fights in MC (Shazzrah, Baron Geddon) I think two-hand will continue to be a viable option for warriors.

πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/FBI_Secret_Agent
πŸ“…︎ Jan 14 2022
🚨︎ report
Me and my bro playing Battle Assault 2 ONLINE via Parsec. Low tier mains FTW! v.redd.it/f99ihhfo10a81
πŸ‘︎ 334
πŸ’¬︎
πŸ‘€︎ u/thesilentyak
πŸ“…︎ Jan 06 2022
🚨︎ report
How can I parse this simple type of Boolean expressions with Parsec?

I have this simple type of Boolean expressions:

data BoolExp a =
  BSelect a
  | BNot (BoolExp a)
  | BAnd [BoolExp a]
  | BOr [(BoolExp a)]

instance Show a =&gt; Show (BoolExp a) where
  show (BSelect a) = show a
  show (BNot a) = "! " ++ pwrap (show a)
  show (BAnd as) = intercalate " &amp; " ( (pwrap . show) &lt;$&gt; as)
  show (BOr as) =  intercalate " | " ( (pwrap . show) &lt;$&gt; as)

pwrap p = "(" ++ p ++ ")"

My goal is to be able to parse them. I have written this code:

import Text.Parsec
import Text.Parsec.String
import qualified Text.Parsec.Token as P
import Text.Parsec.Language (emptyDef)
import qualified Data.ByteString as B

import Regex.Types

lexer       = P.makeTokenParser emptyDef

parens      = P.parens lexer
braces      = P.braces lexer
symbol      = P.symbol lexer
natural     = P.natural lexer

pSelect :: Integral a =&gt; Parser (BoolExp a)
pSelect = BSelect &lt;$&gt; fromIntegral &lt;$&gt; natural

pAnd :: Parser (BoolExp a) -&gt; Parser (BoolExp a)
pAnd prsr = BAnd &lt;$&gt; prsr `sepBy1` (symbol "&amp;")

pOr :: Parser (BoolExp a) -&gt; Parser (BoolExp a)
pOr prsr = BOr &lt;$&gt; prsr `sepBy1` (symbol "|")

pNot :: Parser (BoolExp a) -&gt; Parser (BoolExp a)
pNot prsr = BNot &lt;$&gt; ((symbol "!") *&gt; prsr)

pBool :: Integral a =&gt; Parser (BoolExp a)
pBool = try (pNot pBool)
        &lt;|&gt; try (pOr pBool)
        &lt;|&gt; try (pAnd pBool)
        &lt;|&gt; try (parens pBool)
        &lt;|&gt; pSelect

I think the grammar I am trying to go for is self explanatory based on the code. However, this goes into a loop for most expressions, even parse pBool "" "! 12". How can I fix this?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/agnishom
πŸ“…︎ Jul 08 2021
🚨︎ report
Formal Specification and Programmatic Parser for Org-mode

The org-parser is an amazing library written by 200ok-ch. I want to share my joy with you about it.

Certainly, this is not the first org parser out there. What's different, however, is that it's a programmatic parser with a formal specification. Lost? Let me explain.

TLDR: it parses a formal grammar of org-mode in its EBN form, and generates a parser!

What is an EBN form?

Let's quickly go through what an EBN form is. Roughly, it is a specification of the grammar of grammars! For example, the following is an EBN form for simple math expressions (taken here).

(setq simple-math-grammar
      "
      &lt;S&gt; = VAL | EXPR | PAR
      PAR = &lt;'('&gt; S &lt;')'&gt;
      &lt;EXPR&gt; = S OP S
      VAL = #'[0-9]+'
      OP = '+' | '-' | '*' | '/'
      ")

With this grammar specification, it's an interesting problem to write a parser generator parser that turns simple-math-grammar into a programmatic parser:

(funcall (parser simple-math-grammar) "((2*3)+1+2)/4")
=&gt; ([:PAR [:PAR [:VAL "2"] [:OP "*"] [:VAL "3"]]
          [:OP "+"] [:VAL "1"] [:OP "+"] [:VAL "2"]]
    [:OP "/"] [:VAL "4"])

How magical, right? (Check this blogpost to see how it allows you to transform the parsed data easily afterward.)

What's so great about EBN forms?

It's great because of several reasons. First, it is a specification of the grammar of grammars. It provides a theoretic framework to study grammars.

Practically, what's more important perhaps is that it provides a formal way to specify a language! This is far better than having a loose description of a language by examples. It makes the language rigorous, better, cleaner, portable, and easier to extend!

What about org-mode?

The official specification of org-mode did a good job, but it is not machine readable nor formal. So there are only tests (but no proofs) for that the official parser (org-element.el) really does what the spec says. It would be nice if the official org-mode can have such a formal specification. (For other benefits, see this).

Enter org-parser! It is indeed such a thing implemented already! Remember the magical parser I mentioned above? It is already implemented here [Engelberg/instaparse](https://githu

... keep reading on reddit ➑

πŸ‘︎ 65
πŸ’¬︎
πŸ‘€︎ u/jin-cg
πŸ“…︎ Jan 11 2022
🚨︎ report
Which XML parser should I use?

Hello, new to C#. I'm trying to parse some XML data from an API but there seems to be a lot of different XML parsers out there - XMLDocument, XDocument, XMLSerializer, XMLReader etc.

Is there a standard one everyone uses? Or which one is a newer/better performance/better syntax/version?

Would love some advice/suggestions. Thanks!

πŸ‘︎ 36
πŸ’¬︎
πŸ‘€︎ u/CupNoodlese
πŸ“…︎ Jan 20 2022
🚨︎ report
Parcel CSS: A new CSS parser, compiler, and minifier parceljs.org/blog/parcel-…
πŸ‘︎ 111
πŸ’¬︎
πŸ‘€︎ u/wild-eagle
πŸ“…︎ Jan 12 2022
🚨︎ report
How do I parse Haskell style applications in a Pratt parser?

I want to implement a functional language so recently I decided to make the move from the Scala style function application ( f(x, y) ) to the Haskell style application ( f x y ).

So I've been trying to think of how to implement it in a way that respects operator precedence but I've come up blank. I tried Google but I haven't got any useful results (Maybe it's because I'm using the wrong search terms). So I decided to ask here.

After thinking, I have distilled the problem down to this: Function application is an infix operation. To put it in the precedence table, I need an operator token. The application operator is just the whitespace between the function and the argument. But, I throw away all the unnecessary whitespace tokens in the lexer so I can't use them in the parser.

By the way, my parser is based on the [blog post] (http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/) by u/munificent.

Thanks in advance!

E: Linked to the blog post.

πŸ‘︎ 32
πŸ’¬︎
πŸ‘€︎ u/MadSnipr
πŸ“…︎ Jan 15 2022
🚨︎ report
Rust parser combinator libraries 2021

There are many parsing combinator libraries in Rust but I've yet to find a good comprehensive comparison. Would be nice to read about things like ease-of-use, documentation, performance, ect.

My take: The most popular seems to be nom, there are many blogs using nom which is nice, but for some reason I find combine much more readable while trying to learn all this. This is not a deal breaker but nom returning (rest, match) instead of (match, rest) is very unintuitive and slightly hurts my eyes, combine seems to solve this. Also combine seems to be inspired by this parsing library from Haskell called Parsec, I don't know how good or famous Parsec is to know if it matters to follow its style.

There are many other libraries but I don't think I have the energy to explore all them, if someone with more experience can "parse" through all this it would be of great help.

πŸ‘︎ 18
πŸ’¬︎
πŸ‘€︎ u/cgarciae
πŸ“…︎ May 01 2021
🚨︎ report
The time Amy Santiago was wrong! While a parsec is a measure of distance, it is correctly used in the Star Wars universe, referring to the path Han Solo took not the time it took him to travel it!
πŸ‘︎ 767
πŸ’¬︎
πŸ“…︎ Dec 21 2021
🚨︎ report
Alternative Lua parser for nvim-treesitter. It closely follows the syntax of Lua in extended BNF (https://www.lua.org/manual/5.1/manual.html#8). github.com/MunifTanjim/nv…
πŸ‘︎ 75
πŸ’¬︎
πŸ‘€︎ u/MunifTanjim
πŸ“…︎ Jan 13 2022
🚨︎ report
how to build a JSON parser?

I want to know about some simple method to parse json,
have read jsmn (https://github.com/zserge/jsmn)
is there some way to based on some middle library?

πŸ‘︎ 32
πŸ’¬︎
πŸ‘€︎ u/googcheng
πŸ“…︎ Dec 27 2021
🚨︎ report
Parsers

Still need to be nerfed with slower rotation speed and hit scan changed to projectile based.

πŸ‘︎ 17
πŸ’¬︎
πŸ‘€︎ u/SphynxterMAHONY
πŸ“…︎ Dec 20 2021
🚨︎ report
~30ms game stream latency via Parsec with host PC in Quezon City (Converge) and client laptop in Baguio (PLDT), ~210km apart
πŸ‘︎ 63
πŸ’¬︎
πŸ‘€︎ u/Ryvaeus
πŸ“…︎ Jan 04 2022
🚨︎ report
I have never needed generics in Go, and I've probably been using it since 2017... and I've written Go programs for Fortune 50 companies, as well as complex personal projects such as AST parsers/code generators. I'm pretty disappointed to see generics introduced into the language news.ycombinator.com/item…
πŸ‘︎ 109
πŸ’¬︎
πŸ“…︎ Dec 17 2021
🚨︎ report
CppCast: C++ Compile Time Parser Generator cppcast.com/compile-time-…
πŸ‘︎ 19
πŸ’¬︎
πŸ‘€︎ u/robwirving
πŸ“…︎ Jan 14 2022
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.