OutdatedExpression Parser Release [1x8]

Posts 16 of 6 · Page 1 of 1
Expression Parser Release [1x8]
Introduction
Welcome to the release of Expression parser version 1x8.
This is going to be a short thread as all the necessary information can be found in my other threads created about ep, they can be seen at the bottom of this page.

What is Expression Parser?
Ep, which by the way is short for Expression Parser, is a new scripting language created for the sole purpose of being used by MPGH members exclusively. It's meant to work along the side of C++, meaning you can directly use ep in your C++ Applications by simply including the ep headers and libraries. The now improved C++ portability means you can have ep arguments (variable_list) automatically deduced into arguments at C++ compile time.

I wanna learn more, how does it work?
Expression Parser Theoretical Introduction
Expression Parser Practical and Syntactical Introduction


Changelog
[...]

Version 1x6
Code:
- Added a few new keywords:
    group
    members
    methods
    public (W.I.P They have no meaning yet)
    private (W.I.P They have no meaning yet)
    
- Improved some error messages

- Fixed reference bug 
  (Assigning a variable that was a reference never changed the original reference, only swapped them)
  
- New syntax rules:
    following a method keyword can now have it's identifier defined within single quotes. (')
    Example:
        method 'x'();
    
    It's meant to be used for operators in groups, such as:
        method '='( &other )
        {
            x_ = other->x_;
            y_ = other->y_;
        };
        
- Fixed internal tokenizer error (' character threw an unrecognized sequence error)

- Added the following operators to internal types (integral, floating, string_literal):
    '=' operator;
    
- Added feature to dispatch_state allowing a this ptr to be recognized through
  it's arguments, and as such can later be used when looking for a variable.
  note that the following example will not throw an error, but instead
  the X()'s local 'x_' is implicitly selected, instead of X's 'x_' member:
    group X
    {
    members;
        var x_;
    methods:
        X( &x )
        {
            var x_;
            x_ = x; // use this->x_ for explicit usage
        };
        
        method print()
        {
            cout << x_ << endl;
        };
    };
    
    auto x = X( 10 ); // X::x_ is left unchanged, as you are implicitly selecting the local variable
    // x_ instead, be careful about this!
    x->print( );
    
  Output:
    undefined behaviour or 0 (depending on implementation, as you never initalize x_)
    
  Firstly, note that, this is the intended implementation, this is not a logical error,
  but instead a logical feature. No errors should arise as long as you learn the proper
  usage.
  
  Secondly, as aforementioned; the same rules apply to global vs local scope.
  
- Also important to note, when a group is created only the clone, constrctor, and destructor
  may be automatically emitted, any operators (such '=') must always be explicitly defined.
  
- Since this wasn't actually around previously, enabled the access of member variables with
  '->' operator, however only if their storage flag is 'public' (W.I.P).
Version 1x7
Code:
- Added a few new working keywords (means they're implemented)
    break
    continue
    public
    private
    
- Added the ability for a developer to specift if an argument should be a ep reference
  (using the automatic deduction method) specify your argument as ep::argument_ref_ptr.
  
- Added implementation of binary files (use epcc to compile your *.ep file into a *.oep)

- Huge improvements/bug fixes to asignments (before you couldn't do object->x = 5, or get_x() = 5)
  you can now! Yay.
Version 1x8
Code:
- Added more C++ type safety.'
  You can no longer create value_reference of int and cast it to e.g double.
  
- Fixed an assignment bug (I forgot to change a function)

- Remade error message system completely and it now has better error messages.

- Made some changes to value reference.
VirusTotal

Sincerely,
Yamiez.
expression parser_mpgh.net.rar6.0 MB · 17 downloads Clean
Thank Yamiez for thiss
Quote Originally Posted by Vice View Post
Thank Yamiez for thiss
You're welcome, if you use it and encounter a bug, please contact me and I'll try to get it solved!
I think it would be helpful if there was an example project that uses your ep language included with each release (or uploaded as a separate attachment, or maybe appended to your practical introduction thread?). Nothing fancy. Just a simple demonstration of how this lib might come in handy.

Thoughts?
Quote Originally Posted by k3jl7h View Post
I think it would be helpful if there was an example project that uses your ep language included with each release (or uploaded as a separate attachment, or maybe appended to your practical introduction thread?). Nothing fancy. Just a simple demonstration of how this lib might come in handy.

Thoughts?
Yep, currently working on doing this!
The langauge itself is quite a lot of work single handedly, so I'm trying my best with the limited free time I have ^^

this is currently one of the examples I'm working on:
/Outdated, closed.
Posts 16 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?