Re: [code] Lexer creation problem.

From: Michael Richter <ttmrichter.att.gmail.com>
Date: Sun, 15 Nov 2015 21:26:40 +0800

*sigh*

Never mind. I'm an idiot.

On 15 November 2015 at 21:11, Michael Richter <ttmrichter.att.gmail.com> wrote:

> I'm trying to create the "run" command for SNOBOL4. In
> ~/.textadept/modules/snobol4/init.lua I have these two lines:
>
> textadept.run.compile_commands.snobol4 = 'snobol4 -b "%f"'
> table.insert(textadept.run.error_patterns, 1, '^(.-):(%d+): (.+)$')
>
> I have confirmed using ^E that the strings are in place. When I hit ^R in
> a buffer (or select Tools->Run) nothing happens at all.
>
> What have I done wrong?
>
> On 14 November 2015 at 15:28, Michael Richter <ttmrichter.att.gmail.com>
> wrote:
>
>> Sorry, I completely missed this, Mitchell.
>>
>>
>> Thanks! I'd be happy to include it. However, what file extensions are
>>> used?
>>
>>
>> .sno or .SNO
>>
>>
>>> And are there any run/compile commands?
>>
>>
>> snobol4
>>
>> There's no compilation (this is an interpreted language). Beyond that,
>> I'm not sure what you'd need to see. I don't use run/compile from within
>> editors ever so I don't know what's desired. If you mean things like
>> command line options, here's the help text:
>>
>> CSNOBOL4B version 2.0 (January 1, 2015)
>>> built Fri Jan 2 15:30:47 CST 2015
>>> Usage: snobol4 [options...] [files...] [parameters...]
>>> -b disable display of startup banner
>>> -d DESCRS[km]
>>> size of dynamic region in descriptors (default: 512k)
>>> -f toggle folding of identifiers to upper case (-CASE)
>>> -g enable GC trace (&GTRACE)
>>> -h help (this message)
>>> -k toggle running programs with compilation errors (-[NO]ERRORS)
>>> -l LISTINGFILE
>>> enable listing (-LIST) and specify file
>>> -n toggle running program after compilation (-[NO]EXECUTE)
>>> -p toggle SPITBOL operators (-PLUSOPS)
>>> -r toggle reading INPUT from after END statement
>>> -s toggle display of statistics
>>> -u PARMS
>>> parameter data available via HOST(0)
>>> -v display version and exit
>>> -x force display of startup banner
>>> -B toggle SNOBOL4B operators (-[NO]BLOCKS)
>>> -I DIR add directory to search path
>>> -L SOURCE
>>> load source file before user program
>>> -M process multiple files for program code
>>> -N clear search path
>>> -P DESCRS[km]
>>> size of pattern match stack in descriptors (default: 8000)
>>> -S DESCRS[km]
>>> size of interpreter stack in descriptors (default: 4000)
>>>
>>> For memory region sizes a suffix of 'k' (1024) and 'm' (1024*1024)
>>> can be used. A descriptor takes up 16 bytes.
>>>
>>
>>
>>> Error patterns to match?
>>
>>
>> I assume this is for compiler errors? If so, it's not applicable. As an
>> interpreted language it's a "suck it and see" situation. If it's for
>> syntax checking then there are some feasible patterns I guess.
>>
>>
>>> Syntax checking commands?
>>
>>
>> snobol4 -n "compiles" the source (tokenizes it) without running it. It's
>> traditionally used for syntax checking.
>>
>>
>>> The latter three, if available, would be a nice touch, but are not
>>> mandatory.
>>>
>>
>> If you can point me to where I can quickly get up to speed on providing
>> these, I'll gladly add them if feasible.
>>
>>
>>> Please feel free to send over any other lexers you have with the same
>>> kind of information. I'd be more than happy to expand Textadept's language
>>> support!
>>
>>
>> My next project is to extend the Prolog support to add Logtalk to it.
>> (Logtalk is a strict superset of Prolog, so any syntax colouring that works
>> for Logtalk will work for Prolog without change.)
>>
>> --
>> "Perhaps people don't believe this, but throughout all of the discussions
>> of entering China our focus has really been what's best for the Chinese
>> people. It's not been about our revenue or profit or whatnot."
>> --Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
>>
>
>
>
> --
> "Perhaps people don't believe this, but throughout all of the discussions
> of entering China our focus has really been what's best for the Chinese
> people. It's not been about our revenue or profit or whatnot."
> --Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
>

-- 
"Perhaps people don't believe this, but throughout all of the discussions
of entering China our focus has really been what's best for the Chinese
people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sun 15 Nov 2015 - 08:26:40 EST

This archive was generated by hypermail 2.2.0 : Mon 16 Nov 2015 - 06:42:35 EST