G
G
Grigory Dikiy2015-09-08 16:52:34
PHP
Grigory Dikiy, 2015-09-08 16:52:34

Creating a code editor, literature, examples?

Hello, I am a student and I was asked to write my own code editor with highlighting in C ++ using the SDL2 library, has anyone faced a similar task, they are interested in the stages of competent design. Maybe someone knows good literature on this subject?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Apostol63, 2019-04-03
@Apostol63

Have you checked if the data is coming to dost.php at all?
and does it send ajax at all?
add success to ajax to check that ajax itself worked and see what comes to you in dost.php.
Add file_put_contents for example

T
ThunderCat, 2019-04-03
@ThunderCat

it just loads a blank page with dost.php.
which is not surprising, the form is simply submitted, no Ajax simply has time to be processed, how to prevent this, I actually painted it with comments in your last question.
how to check what is going on:
there are 2 options for javascript:
a) noob variant - alert('some string'); in principle, it allows you to understand what and where came during the execution of the script
; b) I use the approach - console.log(some_var); - displays detailed information about the variable in the browser console
Further - in general, developer tools in chrome (F12) or, for example, firefox, which track a lot of things, you should know them at least in general terms, read how to work with them, there is a lot of material.
Now - what and where (and how) is sent:
The network tab in the developer tools shows all network requests (including cached ones), they can be filtered by type, which is very convenient for tracking, for example, Ajax requests. Each requested element contains, in particular, a method, a URL, data, and a server response. You can use it to see what the server answered in response to Ajax, you don’t need any files or other crap, just look at the server’s response.
On the php side - FIRST THING, if we send some data, we check in what form they came, that is, the first line when debugging is var_dump($_POST); exit; and see what came to the server.

A
AtomKrieg, 2015-09-08
@AtomKrieg

See Syntax Highlight for compiler theory at MIT (the first half is about parsing and tokenizers):
ocw.mit.edu/courses/electrical-engineering-and-com...
Lectures are available in video format. The most important stage in the design will be the choice of a simpler language - pascal or python :)
There is also a lot of information on the lexical and syntax analysis tags.
For example:
www.pling.org.uk/cs/lsa.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question