To jest stara wersja strony!
Opis
PrologEns
Spotkania
080408
Projekt
Poniżej zamieszczam wyniki wykonania projektu kolorowania składni języka Prolog w GNU Enscript.
/**
* Name: prolog
* Description: Prolog (PROgramming in LOGic) programming language.
* Author: Pawel Marek <p.marek@student.agh.edu.pl>
*/
state prolog extends HighlightEntry
{
/* Comments. */
/\/\*/ {
comment_face (true);
language_print ($0);
call (c_comment);
comment_face (false);
}
/* Comments. */
/%/ {
comment_face (true);
language_print ($0);
call (eat_one_line);
comment_face (false);
}
/* String constants. */
/'/ {
string_face (true);
language_print ($0);
call (prol_string);
string_face (false);
}
/* String constants. */
/\"/ {
string_face (true);
language_print ($0);
call (c_string);
string_face (false);
}
/* Symbols. */
/+|-|*|\/|\\\\|\^|<|>|=|~|:|\.|,|?|@|#|\$|&/ {
keyword_face (true);
language_print ($0);
keyword_face (false);
}
/* Brackets. */
/\[|\]|\(|\)/ {
function_name_face (true);
language_print ($0);
function_name_face (false);
}
/* Predicates. */
/([A-Z])([a-zA-Z0-9]*)/ {
bold (true);
language_print ($0);
bold (false);
}
/* Numbers. */
/([0-9])/ {
type_face (true);
language_print ($0);
type_face (false);
}
}
state prol_string extends Highlight
{
/\\\\./ {
language_print ($0);
}
/'/ {
language_print ($0);
return;
}
}
/*
Local variables:
mode: c
End:
*/
Sprawozdanie
Materiały