This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ULTRA FAST Profesional Parser

I NEED IT TO DO;

Evaluate math expressions that are defined at run time.
Easey implementation, flexibility, sturdiness and speed at the core of the product's design.
Includes direct support for C and C+++, and more.

Speedy parsing and evaluations

Library of standard arithmetic, trigonometric, relational (comparison), and miscellaneous routines (for both numbers and strings). See complete list of operators and functions

User-defined operators and functions, with support for overloading, overshadowing, bootstrapping, or recursion; optional arguments, fixed or indefinite number of arguments; multi-statements separated by semicolons

User operator definitions can be infix, prefix, or postfix, and can be given a precedence level; an operator can be alphanumeric or be composed of symbols

User variables (and constants) who can be internal, or attached to a variable in your host program, or any valid memory addresses.

A user variable can be defined as a temporary local item

Selected definitions can be locked to prevent redefinition

Supported data types include: Byte, Integer, Long, Dword, Single, Double, Extended, Currency,
SortedList, Table, LPCSTR (null-terminated string), FixedLength string, dynamic String, user-defined types, and lots more

Multi-threading

FPU control

Exception handling (for overflow, division by zero, etc.) and general error handling

User-defined character patterns and syntax constructs

Items (functions, variables, operators, ...) can be renamed, or undefined

I NEED CODE IN SOURCE. WHO CAN HELP??????

Parents Reply Children
  • You could submit this for your project. It has a few niggly glitches which I haven't yet figured out, but it should produce the right answer.

    
    int evaluate ( char * expression )
    {
      return strlen ( expression ) - 11;
    }
    
    
    void main ( void )
    {
      int ans;
    
      ans = evaluate ( "what is 2+2" );
    
      printf ( "the answer is %d\n" , ans );
    }
    
    

  • There are no parsers that can evaluate arbitrary expressions. There can't be. A parser needs a grammar to know what to do.

    There exists tools like Yacc, that allows a user to define a grammar and have the tool create the parser. Guess what - it requires a huge amount of work. Because the complexity of the grammar directly folows from how "arbitrary" expressions you want to be able to process. And the different rules of the grammar must map to code blocks that performs the actual actions.

    By bye way - I want a camera that can view the world and automagically take photos (with good framing, exposure, focus, bokeh) when it sees something worthy. There must exists a number of good, open-source, solutions. Please help and link me some code. Need now!

  • Sew eye kin git dgre frum U nviercity n
    gradeate. Thn eye
    kin beee nGinNeRR. cee?