#FurryScript
1 messages ยท Page 2 of 1
-67
Give me critique
lemme go to my keyboard
one sec
how is the parser supposed to know the difference between " and '
if im not wrong both are string
but with different rules
i will split this into two cases then
or
i could just ignore it
compeltely
delete the project from github
i will use orbls hxmini instead if you do that
does hxmini iven have interpolation checking
idk, never seen the code
but it works perfectly for modifying data
im checking the code
ill do the same (:
bruh this is my first lexer
and im doing it the hard way
char by char
instead of line by line
im not making my own buffered reader
๐
๐๐๐๐๐๐
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
char by char works just fine
your saying this like
theres a book
explaining
how to write
a fully functional lexer
in haxe
if there was
id read it
ive spent so much time studying programming languages, lexers, and parsers, and you guys come up with this crap
you know how to code?
im doing this based on intuition and shitty logic
Ah yes i know programming concepts so i can design a whole lexer
thats how programming works
ah yes
exactly
idiot
absolute idiot
software development and programming are two different things
i can write code based on concepts
but i cant design a whole system
from scratch
without reference
you know conceps about coding, you can apply those concepts to all the programming languages
ive used a rust tutorial
then find a lexer
tutorial
fully
functioning
with step by step guide
and example code
This is the first part in a multipart ongoing series for building a minimal programming language in JavaScript. Today's video cover lexing and how to produce tokens needed for the parser stage.
Source code: https://github.com/tlaceby/guide-to-interpreters-series
If you want to follow along then please have a modern version of Deno installed a...

thats what i always send
im using lexer states
to determine which chars
to add to a string buffer
based on conditions
every line is a keystate
then when it finds a =
its a value state
if it finds a # its a comment state
a # cant be inside a keystate with a key
complex things like what
i can always make a new state
that state handles complex thigns
inside of that state i can manually move the pos forward or backwards
dependent on logic
like []
i can make a section state
that appends all values inside of []
to a sectionBuffer
okay, im going to ask you the same question i was asked 4 years ago, in a realistic scenario: how would you handle hexadecimal numbers?
can env even have hexadecimal numbers
inside of the value
how do you will know if its a basic number like 12312312 or a hex number like 0x333
both start with a number
detect if its a hex inside of appendValue
if its start with 0x
its mostly likely
a hex
and if not
if a coding interviewer saw that, youd get fired, it doesnt matter if you understand complex concepts if you dont know the basics of coding
WHAT BASICS OF CODING
there is no basics to a lexer
im reading chars and converting them to tokens
hxenv/Lexer.hx:144: 2
hxenv/Lexer.hx:144: 3
hxenv/Lexer.hx:144: 4
hxenv/Lexer.hx:144: 5
hxenv/Lexer.hx:276: Detected as hex:,819
hxenv/Lexer.hx:144: 6
hxenv/Lexer.hx:144: 7```
you know, its useless talking to someone who doesnt want to listen, even alex gave you a "dude" after seeing your code
What do you want me to do
I HAVE NO REFERENCE
this is my only reference
hxenv/Lexer.hx:144: 2
hxenv/Lexer.hx:144: 3
hxenv/Lexer.hx:144: 4
hxenv/Lexer.hx:144: 5
hxenv/Lexer.hx:144: 6
hxenv/Lexer.hx:144: 7
Main.hx:12: [Key(KEY),Equals,Value(VALUE),Comma,Comment(multiline),Newline,Value(VALUE2),Comma,Newline,Value(VALUE3),Newline,Newline,Key(KEY4),Equals,Value(VALUE4),Comment(test),Newline,Key(KEY5),Equals,Value(VALUE5),Comment(TEST),Newline,Eof]```
it works.
it has error handling
its env file format
simple syntax
hxenv/Lexer.hx:144: 2
hxenv/Lexer.hx:93: characters 5-10 : Uncaught exception Cant have comment in multiline
hxenv/Lexer.hx:134: characters 6-22 : Called from here
hxenv/Lexer.hx:66: characters 3-13 : Called from here
Main.hx:12: characters 15-33 : Called from here```
yet you dont help. I am asking for critique and you give no useful critique only vague answers
"you dont know the basics of coding", "your system doesnt allow complex things"
all vague
sorry ๐
do you forgive me? ๐ฅน
yeah ๐ฅน๐ฅน๐ฅน๐ฅน
@harsh frost https://github.com/MonekyTheShep/HxEnv/blob/main/hxenv/Lexer.hx i rewrote the fucking lexer
The lexer goes with the approach of delayed emission
meaning it gets the context of the line
and then builds the token based on flags
niceiguess
burp
for multiline support ill make it so it doesnt reset the value buffer until its no longer a multiline
300 lines of bullshit
wha
thats my lexer
damn how i had the energy to write thousands of lines of code
๐ญ
this is my parser
write thousands of lines of code isnt hard
im really lazy
i write a hundred lines a week
sometimes a month
that project was made in three days
and im very happy with it
yep it sucks
@harsh frost mf stealing code & comments ๐
his:
https://github.com/MonekyTheShep/HxEnv/blob/6b87692bb03e8aa24b72b0929cf2005635275f95/hxenv/Env.hx
mine:
https://github.com/hackx2/hxmini/blob/462131341df72e74f349c1328f2cdabe3a8e6258/mini/Ini.hx
dayum
cros "rewrite AST" was him just copy and pasting my code
https://github.com/MonekyTheShep/HxEnv/commit/14118c9fcfaee2f7af0226053a4b9fa6b1e672e4
this shit ain't real
this guy loves to bitch abt me using underscores Infront of my variable names ๐ญ
so true ๐ฅน
wha
