-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from nberth/src-line-folding
Support changes of reference format when folding over source lines
- Loading branch information
Showing
50 changed files
with
876 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,5 @@ val from_dialect | |
-> strict: bool | ||
-> Types.DIALECT.t | ||
-> (module T) | ||
|
||
val dialect: t -> dialect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
preproc_keywords.ml linguist-generated | ||
compdir_keywords.ml linguist-generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
(**************************************************************************) | ||
(* *) | ||
(* SuperBOL OSS Studio *) | ||
(* *) | ||
(* Copyright (c) 2022-2023 OCamlPro SAS *) | ||
(* *) | ||
(* All rights reserved. *) | ||
(* This source code is licensed under the GNU Affero General Public *) | ||
(* License version 3 found in the LICENSE.md file in the root directory *) | ||
(* of this source tree. *) | ||
(* *) | ||
(**************************************************************************) | ||
|
||
%{ | ||
open Compdir_tree | ||
%} | ||
|
||
%token EOL | ||
%token <string> TEXT_WORD | ||
%token <string> ALPHANUM | ||
%token CDIR_SET [@keyword ">>SET", "$SET"] | ||
%token CDIR_SOURCE [@keyword ">>SOURCE", "$SOURCE"] | ||
%token FORMAT [@keyword] | ||
%token FREE [@keyword] (* +COB2002 *) | ||
%token IS [@keyword] | ||
%token SOURCEFORMAT [@keyword] | ||
|
||
%token <Text.text_word> INVALID_ | ||
|
||
(* Entry points *) | ||
|
||
%start <Compdir_tree.directive> compiler_directive | ||
|
||
%start <unit> _unused_symbols (* <- used to supress some warnings *) | ||
|
||
(* -------------------------------------------------------------------------- *) | ||
|
||
%% | ||
|
||
(* --------------------- DEDICATED UTILITIES -------------------------------- *) | ||
|
||
let loc (X) == | ||
| x = X; { x, $sloc } | ||
|
||
(* --- Entry points --------------------------------------------------------- *) | ||
|
||
let compiler_directive := | ||
| ~ = source_format; EOL; < > | ||
| ~ = set_sourceformat; EOL; < > | ||
| ~ = set_generic; EOL; < > | ||
|
||
(* --- >>SOURCE | $ SET SOURCEFORMAT ---------------------------------------- *) | ||
|
||
let source_format := | ||
| CDIR_SOURCE; FORMAT?; IS?; free = loc(FREE); | ||
{ Source_format_is_free (snd free) } | ||
| CDIR_SOURCE; FORMAT?; IS?; i = text_word; | ||
{ Source_format_is i } | ||
|
||
let set_sourceformat := | ||
| CDIR_SET; SOURCEFORMAT; i = loc(ALPHANUM); (* elementary_string_literal? *) | ||
{ Set_sourceformat i } | ||
|
||
(* --- >>SET ... | $ SET ... ------------------------------------------------ *) | ||
|
||
let set_generic := | ||
| CDIR_SET; w = text_word; | ||
{ Set w } | ||
|
||
(* --- Misc ----------------------------------------------------------------- *) | ||
|
||
let text_word == (* text-word with position *) | ||
| ~ = loc(TEXT_WORD); < > | ||
|
||
_unused_symbols: | ||
| INVALID_ | ||
{ () } | ||
|
||
%% |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(**************************************************************************) | ||
(* *) | ||
(* SuperBOL OSS Studio *) | ||
(* *) | ||
(* Copyright (c) 2022-2023 OCamlPro SAS *) | ||
(* *) | ||
(* All rights reserved. *) | ||
(* This source code is licensed under the GNU Affero General Public *) | ||
(* License version 3 found in the LICENSE.md file in the root directory *) | ||
(* of this source tree. *) | ||
(* *) | ||
(**************************************************************************) | ||
|
||
open Cobol_common.Srcloc.TYPES | ||
|
||
type directive = | ||
| Source_format_is_free of lexloc | ||
| Source_format_is of (string * lexloc) | ||
| Set_sourceformat of (string * lexloc) | ||
| Set of (string * lexloc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.