NGN - Customizable Programming Language

  • oldmud0
    22nd Aug 2015 Member 0 Permalink

    Are you making a language for fun, or because you find the new language more convenient/natural for your needs?

    Edited once by oldmud0. Last: 22nd Aug 2015
  • FeynmanLogomaker
    22nd Aug 2015 Member 0 Permalink
    I started writing it in English class last year because I didn't feel like paying attention.
    now that I think about it, I can see why mniip hates me, im exactly what a programmer shouldn't be
    Edited once by FeynmanLogomaker. Last: 22nd Aug 2015
  • boxmein
    22nd Aug 2015 Former Staff 1 Permalink
    @mniip (View Post)
    He'll make an AST/lexed language later I assume - this is steps to it. Not everyone here became bachelors' level mathematicians at the age of 16... :D
  • Mrprocom
    22nd Aug 2015 Moderator 1 Permalink
    @mniip (View Post)
    Hey, it's a start. I don't think the syntax is that terrible.
    Edited once by Mrprocom. Last: 22nd Aug 2015
  • FeynmanLogomaker
    22nd Aug 2015 Member 0 Permalink
    Yeah right now it's not much more than a novelty but I'm building it up
  • MiningMarsh
    23rd Aug 2015 Member 0 Permalink

    Does this offer any flexibility on the level of homoiconic macros? It looks like it is just pattern matching based (which would mean no), but I don't know if a "frame" gets full access to the code body.

  • FeynmanLogomaker
    24th Aug 2015 Member 0 Permalink
    I have no idea
  • FeynmanLogomaker
    25th Aug 2015 Member 0 Permalink
    Okay I'm rewriting this so it doesn't rely on pattern matching for the engine while still offering decent customization; so far it just uses an alternate pattern matching thing I wrote but I've made it so that can be easily changed later.


    EDIT: I'm rewriting and restructuring it so that it operates more similarly to a real language while retaining its customizability


    Please note that, because its intended purpose is very different from a more traditional language, it will most likely never fully implement the traditional lexical analysis/AST formation/execution procedure, and instead have some overlap between lexing and parsing.


    CHANGELOG
    0.0.5 (ALPHA) - Full engine rewrite

    Edited 4 times by FeynmanLogomaker. Last: 25th Aug 2015
  • mniip
    26th Aug 2015 Developer 1 Permalink
    {"for%s-(%b())%s-(%b{});", ""},

    That's not a token.

    Take a look at lua tokens:
    # % ( ) * , - . / : ; < = > [ ] ^ { }

    TK_AND, TK_BREAK, TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION, TK_GOTO, TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT, TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE, TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_DBCOLON, TK_EOS

    TK_NUMBER(number), TK_NAME(identifier), TK_STRING(string)


    The job of the tokenizer is to parse
    ..
    into TK_CONCAT and
    'else'
    into a string and not a keyword. Only.
    Edited 3 times by mniip. Last: 26th Aug 2015
  • FeynmanLogomaker
    26th Aug 2015 Member 0 Permalink
    I'm getting there
    also, idk if you read my previous post but I literally just said that this will never function like a normal programming language, since it's not meant to be one. I appreciate your constructive criticism but I think you're missing the point of this.
    Edited once by FeynmanLogomaker. Last: 26th Aug 2015