<joelteon>
ragel doesn't like "expr = lit | var | '{' expr '}'" because i guess recursion is no-no
<joelteon>
what's problem
<whitequark>
ragel has no stack
<whitequark>
well, no implicit stack
<joelteon>
wat do
<whitequark>
use it as a lexer, not as a parser
<devyn>
yeah, you'll have to do it yourself
<whitequark>
ragel+bison
<joelteon>
so lexing is JUST producing tokens
<joelteon>
that's it
<whitequark>
yes.
<joelteon>
my brain
<devyn>
it's not like Parsec; you need to pull it apart first before you can actually put together the scope really
<joelteon>
ok ):
<joelteon>
but now that I have a token stream, it'll be easier to parse it
<joelteon>
well wait a second
<joelteon>
why would i combine ragel and bison
<joelteon>
don't they do the same thing
<alexgordon>
joelteon: no
<alexgordon>
and you wouldn't
<alexgordon>
because bison sucks
<joelteon>
ok explain everything
<alexgordon>
joelteon: ragel takes a character stream and turns it into a token stream
<alexgordon>
or in other words
<alexgordon>
print ( "Hello World" )
<alexgordon>
becomes
<alexgordon>
IDENT, LPAREN, STRING, RPAREN
<joelteon>
right
<alexgordon>
then you hand these tokens to a _parser_
<alexgordon>
hold on
alexgordon is now known as drparse
<drparse>
joelteon: which allows you to build up your parse tree
<joelteon>
ok
<drparse>
joelteon: what are you parsing?
<drparse>
joelteon: there's two major sorts of parsers: "top down" and "bottom up"
<drparse>
top down are what real compilers use
<drparse>
bottom up are what shitty interpreters like PHP and Ruby use
<whitequark>
oh fuck off
<whitequark>
LALR is american school, LL is european school
<whitequark>
that's all.
<devyn>
haha
<whitequark>
and if your language is too complex to be parsed by LALR, guess what, it probably has shitty syntax
<drparse>
;)
<drparse>
whitequark: it's not _that_ but recursive descent parsers (i.e. top down) have the highest quality error messages
<whitequark>
and take an inordinate amount of time to write, yes
<drparse>
I never said it was easy :D
<whitequark>
you can approach the quality of errors with LALR(1), too
<whitequark>
e.g. Menhir+merr
<drparse>
look, I generally use bottom up most of the time
<whitequark>
it's not *exactly* as good as LL but it's close enough for most practical purposes
<drparse>
but recursive descent is the gold standard, no denying it
<devyn>
I'm watching something that's kinda like SAO
<devyn>
but less fancy
<devyn>
with kind of better plot
<devyn>
but lighter
<devyn>
and funnier
<drparse>
sword art online?
<devyn>
it's really fluffy
<devyn>
yes
<drparse>
wtf?
<devyn>
lol what
<purr>
lol
<drparse>
"Sword Art Online (ソードアート・オンライン Sōdo Āto Onrain?) is a Japanese light novel series written by Reki Kawahara and illustrated by abec. The series takes place in the near-future and focuses on various virtual reality MMORPG worlds. The light novels began publication on ASCII Media Works' Dengeki Bunko label from April 10, 2009, with a spin-off series launching in October 2012, and are licensed in North Americ
<drparse>
Yen Press. The series has spawned five manga adaptations. A"
* drparse
is confused
<drparse>
what's a manga adaption?
<devyn>
how come
<devyn>
manga = comic book
<devyn>
tv show -> comic
<whitequark>
drparse: you know Batman was a comic and then they made a film?
<whitequark>
it's like this but in reverse
<drparse>
japan is crazy
<devyn>
haha
<drparse>
whitequark: DID YOU HEAR? FOUR RUSSIAN MEN SLID DOWN A SLOPE IN A TUBE VERY QUICKLY TODAY
<devyn>
oh yeah? did you hear Canada won gold in men's hockey?
<devyn>
(that's the only reason I'm up right now. couldn't go back to sleep.)
<drparse>
four english gentlemen slid down the same slope in a different tube, but they were slower than the four russian men
<whitequark>
idgaf about sport
<devyn>
I usually don't, but hockey is kind of a patriotic thing
<devyn>
it's important
<drparse>
devyn: I saw it on the news! you should be proud, canada was on the news
<devyn>
drparse: yeah lol I watch BBC World News a lot and it's always funny when Canada gets a story in there
<purr>
lol
<devyn>
very rare
<drparse>
WE USED TO OWN YOU!
<devyn>
well at least we were more polite than the USA about it
<devyn>
drparse: quite honestly though I hate watching any kind of local news at all
<devyn>
here
<devyn>
it's just so goddamn boring
<devyn>
nothing interesting ever happens
<devyn>
- someone got killed
<devyn>
- kids doing silly things
<devyn>
- kids doing awesome things
<devyn>
- some sob story
<devyn>
hmm
<devyn>
for some reason this one girl has decided she wants to call the main character "my lord"
<devyn>
but his sidekick is just a pervert
<devyn>
it's like
<devyn>
stereotypes
<devyn>
wow
<whitequark>
devyn: that sounds like something horrible I'd watch and be slightly ashamed of it
<whitequark>
like TKnR
<devyn>
whitequark: yes, I didn't exactly find it on my own... girl I'm interested in recommended it
<devyn>
it's pretty bad, but amusing
<devyn>
it's like they saw SAO and were like "hmmm this isn't representative enough of how MMORPGs are actually like"
<devyn>
so this is like
<devyn>
let's make an anime about an accurate MMORPG virtual reality experience
* devyn
headdesks
<devyn>
this is a lot more realistic though, as far as how MMORPGs are actually like >_>
<devyn>
community-wise
<devyn>
people are kinda dicks, or nice
<devyn>
and really rather weird
<devyn>
I guess it's not that bad when you take that into account
<devyn>
it actually does a pretty good job of representing that
<devyn>
it's called "Log Horizon" btw
<devyn>
I was just saying to her that it kind of reminds me of Mabinogi, if you've ever played that
<devyn>
actually a fair bit
<devyn>
there really isn't a point though
<devyn>
other than
<devyn>
suddenly, we're trapped in an MMORPG
<devyn>
for some reason no one really cares
<drparse>
"girl I'm interested in recommended it" lol
<purr>
lol
<joelteon>
ok so what's going on
<devyn>
why lol
<joelteon>
what do i use for the parsing
<devyn>
joelteon: you build that yourself
<joelteon>
ok
<joelteon>
just manually
<devyn>
oh boy and here comes the tsundere part
<devyn>
kind of expected it but she's even more I guess
<devyn>
wat
<devyn>
she looks like she's like
<devyn>
12
<devyn>
but she's the same age as them
<devyn>
wat
<joelteon>
manual parsing
<joelteon>
GROSS
<devyn>
joelteon: haha now you know why people bitch about it
<joelteon>
can i do it not in C
<devyn>
but then it won't be web scale
<devyn>
>:P
<devyn>
you must implement non-blocking parsing joelteon